Skip to content

Commit

Permalink
Merge pull request #1514 from rhatdan/selinux
Browse files Browse the repository at this point in the history
Don't hard code SELinux labels into code
  • Loading branch information
vrothberg committed Feb 23, 2023
2 parents 0697414 + 01b671b commit 01edf7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/overlay/overlay.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ var (
)

const (
defaultPerms = os.FileMode(0555)
selinuxLabelTest = "system_u:object_r:container_file_t:s0"
defaultPerms = os.FileMode(0555)
)

// This backend uses the overlay union filesystem for containers
Expand Down Expand Up @@ -657,6 +656,8 @@ func SupportsNativeOverlay(home, runhome string) (bool, error) {
func supportsOverlay(home string, homeMagic graphdriver.FsMagic, rootUID, rootGID int) (supportsDType bool, err error) {
// We can try to modprobe overlay first

selinuxLabelTest := selinux.PrivContainerMountLabel()

exec.Command("modprobe", "overlay").Run()

logLevel := logrus.ErrorLevel
Expand Down

0 comments on commit 01edf7e

Please sign in to comment.