From c35a83dbe66dd554addab84a01a20aadf7051172 Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Tue, 9 Jun 2015 13:54:57 -0700 Subject: [PATCH] Update libcontainer to v2.1.1 It includes fix for mounting / as volume on SELinux. docker/libcontainer#619 Signed-off-by: Alexander Morozov Upstream-commit: 38acd31e8a99ef043f9a5cf84f968ebebc31614e Component: engine --- components/engine/hack/vendor.sh | 2 +- .../github.com/docker/libcontainer/label/label_selinux.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/engine/hack/vendor.sh b/components/engine/hack/vendor.sh index d093aea625..32c0d1e3bc 100755 --- a/components/engine/hack/vendor.sh +++ b/components/engine/hack/vendor.sh @@ -69,7 +69,7 @@ mv tmp-digest src/github.com/docker/distribution/digest mkdir -p src/github.com/docker/distribution/registry mv tmp-api src/github.com/docker/distribution/registry/api -clone git github.com/docker/libcontainer v2.1.0 +clone git github.com/docker/libcontainer v2.1.1 # libcontainer deps (see src/github.com/docker/libcontainer/update-vendor.sh) clone git github.com/coreos/go-systemd v2 clone git github.com/godbus/dbus v2 diff --git a/components/engine/vendor/src/github.com/docker/libcontainer/label/label_selinux.go b/components/engine/vendor/src/github.com/docker/libcontainer/label/label_selinux.go index 7bc40ddde2..c8fba845f2 100644 --- a/components/engine/vendor/src/github.com/docker/libcontainer/label/label_selinux.go +++ b/components/engine/vendor/src/github.com/docker/libcontainer/label/label_selinux.go @@ -105,14 +105,14 @@ func Relabel(path string, fileLabel string, relabel string) error { if fileLabel == "" { return nil } + if !strings.ContainsAny(relabel, "zZ") { + return nil + } for _, p := range exclude_path { if path == p { return fmt.Errorf("Relabeling of %s is not allowed", path) } } - if !strings.ContainsAny(relabel, "zZ") { - return nil - } if strings.Contains(relabel, "z") && strings.Contains(relabel, "Z") { return fmt.Errorf("Bad SELinux option z and Z can not be used together") }