Skip to content

Commit 01edf7e

Browse files
authored
Merge pull request #1514 from rhatdan/selinux
Don't hard code SELinux labels into code
2 parents 0697414 + 01b671b commit 01edf7e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/overlay/overlay.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ var (
4747
)
4848

4949
const (
50-
defaultPerms = os.FileMode(0555)
51-
selinuxLabelTest = "system_u:object_r:container_file_t:s0"
50+
defaultPerms = os.FileMode(0555)
5251
)
5352

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

659+
selinuxLabelTest := selinux.PrivContainerMountLabel()
660+
660661
exec.Command("modprobe", "overlay").Run()
661662

662663
logLevel := logrus.ErrorLevel

0 commit comments

Comments
 (0)