diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2022-09-17 07:14:29 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2022-09-17 07:14:31 -0400 |
commit | dc8fdb46c5eda03afed31708474664a52ac958b0 (patch) | |
tree | 37d898c0b2dfb013b80d2a6793526294d079737e | |
parent | 4e14fa05c9e6ce2ad927e953057294ae05748b37 (diff) | |
download | podman-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>
-rw-r--r-- | libpod/container_internal_common.go | 4 |
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 { |