summaryrefslogtreecommitdiff
path: root/vendor/github.com/opencontainers/selinux
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-07-02 10:25:18 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-02 20:39:16 +0000
commit767b3ddc433fd57f461fa9866e3e4d47399a6519 (patch)
tree9a6678f3b1fc5be90946e478ee4df1098026a8ba /vendor/github.com/opencontainers/selinux
parentd357703e061258a57854df1880e23775dbe717ef (diff)
downloadpodman-767b3ddc433fd57f461fa9866e3e4d47399a6519.tar.gz
podman-767b3ddc433fd57f461fa9866e3e4d47399a6519.tar.bz2
podman-767b3ddc433fd57f461fa9866e3e4d47399a6519.zip
vendor in selinux and buildah for darwin compilation
Signed-off-by: baude <bbaude@redhat.com> Closes: #1037 Approved by: baude
Diffstat (limited to 'vendor/github.com/opencontainers/selinux')
-rw-r--r--vendor/github.com/opencontainers/selinux/go-selinux/label/label_selinux.go2
-rw-r--r--vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go2
-rw-r--r--vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go (renamed from vendor/github.com/opencontainers/selinux/go-selinux/selinux.go)7
-rw-r--r--vendor/github.com/opencontainers/selinux/go-selinux/xattrs.go2
4 files changed, 9 insertions, 4 deletions
diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/label/label_selinux.go b/vendor/github.com/opencontainers/selinux/go-selinux/label/label_selinux.go
index f7b238529..f0a055b87 100644
--- a/vendor/github.com/opencontainers/selinux/go-selinux/label/label_selinux.go
+++ b/vendor/github.com/opencontainers/selinux/go-selinux/label/label_selinux.go
@@ -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)
}
diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go b/vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go
index 6068e84a5..5dc09a51e 100644
--- a/vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go
+++ b/vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go
@@ -1,4 +1,4 @@
-// +build linux
+// +build selinux,linux
package selinux
diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/selinux.go b/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go
index 10aa85165..4dbfd83ed 100644
--- a/vendor/github.com/opencontainers/selinux/go-selinux/selinux.go
+++ b/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go
@@ -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
diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/xattrs.go b/vendor/github.com/opencontainers/selinux/go-selinux/xattrs.go
index 7f2ef8504..67a9d8ee8 100644
--- a/vendor/github.com/opencontainers/selinux/go-selinux/xattrs.go
+++ b/vendor/github.com/opencontainers/selinux/go-selinux/xattrs.go
@@ -1,4 +1,4 @@
-// +build linux
+// +build selinux,linux
package selinux