mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
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>
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user