aboutsummaryrefslogtreecommitdiff
path: root/libpod/container_internal_common.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-09-17 07:14:29 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2022-09-17 07:14:31 -0400
commitdc8fdb46c5eda03afed31708474664a52ac958b0 (patch)
tree37d898c0b2dfb013b80d2a6793526294d079737e /libpod/container_internal_common.go
parent4e14fa05c9e6ce2ad927e953057294ae05748b37 (diff)
downloadpodman-dc8fdb46c5eda03afed31708474664a52ac958b0.tar.gz
podman-dc8fdb46c5eda03afed31708474664a52ac958b0.tar.bz2
podman-dc8fdb46c5eda03afed31708474664a52ac958b0.zip
label.Relabel third option is shared not recurse
There is no option in Selinux labeling to only relabel the top level of a directory. The option is to either label the path shared or not shared. Changing to make sure future engineers do not assume that recurse can work. [NO NEW TESTS NEEDED] Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod/container_internal_common.go')
-rw-r--r--libpod/container_internal_common.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/container_internal_common.go b/libpod/container_internal_common.go
index 9c4a3bb67..a0ae22ff4 100644
--- a/libpod/container_internal_common.go
+++ b/libpod/container_internal_common.go
@@ -2659,7 +2659,7 @@ func (c *Container) fixVolumePermissions(v *ContainerNamedVolume) error {
return nil
}
-func (c *Container) relabel(src, mountLabel string, recurse bool) error {
+func (c *Container) relabel(src, mountLabel string, shared bool) error {
if !selinux.GetEnabled() || mountLabel == "" {
return nil
}
@@ -2674,7 +2674,7 @@ func (c *Container) relabel(src, mountLabel string, recurse bool) error {
return nil
}
}
- return label.Relabel(src, mountLabel, recurse)
+ return label.Relabel(src, mountLabel, shared)
}
func (c *Container) ChangeHostPathOwnership(src string, recurse bool, uid, gid int) error {