f71121b1fa
When the code attempts to set the ProcessLabel, it checks if SELinux Is enabled. We have seen a case with some of our patches where the code is fooled by the container to think that SELinux is not enabled. Calling label.Init before setting up the rest of the container, tells the library that SELinux is enabled and everything works fine. Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
26 lines
413 B
Go
26 lines
413 B
Go
// +build !selinux !linux
|
|
|
|
package label
|
|
|
|
func GenLabels(options string) (string, string, error) {
|
|
return "", "", nil
|
|
}
|
|
|
|
func FormatMountLabel(src string, MountLabel string) string {
|
|
return src
|
|
}
|
|
|
|
func SetProcessLabel(processLabel string) error {
|
|
return nil
|
|
}
|
|
|
|
func SetFileLabel(path string, fileLabel string) error {
|
|
return nil
|
|
}
|
|
|
|
func GetPidCon(pid int) (string, error) {
|
|
return "", nil
|
|
}
|
|
|
|
func Init() {
|
|
}
|