vendor in selinux and buildah for darwin compilation

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1037
Approved by: baude
This commit is contained in:
baude
2018-07-02 10:25:18 -05:00
committed by Atomic Bot
parent d357703e06
commit 767b3ddc43
10 changed files with 48 additions and 14 deletions

View File

@ -130,7 +130,7 @@ func Relabel(path string, fileLabel string, shared bool) error {
return nil
}
exclude_paths := map[string]bool{"/": true, "/usr": true, "/etc": true}
exclude_paths := map[string]bool{"/": true, "/usr": true, "/etc": true, "/tmp": true, "/home": true, "/run": true, "/var": true, "/root": true}
if exclude_paths[path] {
return fmt.Errorf("SELinux relabeling of %s is not allowed", path)
}

View File

@ -1,4 +1,4 @@
// +build linux
// +build selinux,linux
package selinux

View File

@ -1,4 +1,4 @@
// +build !linux
// +build !selinux
package selinux
@ -30,6 +30,11 @@ func SetDisabled() {
return
}
// GetEnabled returns whether selinux is currently enabled.
func GetEnabled() bool {
return false
}
// SetFileLabel sets the SELinux label for this path or returns an error.
func SetFileLabel(fpath string, label string) error {
return nil

View File

@ -1,4 +1,4 @@
// +build linux
// +build selinux,linux
package selinux