From 68f22a40f30279005d260ba38590e32a0eff01be Mon Sep 17 00:00:00 2001 From: Paul Morie Date: Wed, 15 Apr 2015 12:02:06 -0400 Subject: [PATCH] Remove workaround for libcontainer Getfilecon bug https://github.com/docker/libcontainer/issues/499 has been fixed --- pkg/kubelet/root_context_linux.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/pkg/kubelet/root_context_linux.go b/pkg/kubelet/root_context_linux.go index f0da41b66ed..73be6cbe95e 100644 --- a/pkg/kubelet/root_context_linux.go +++ b/pkg/kubelet/root_context_linux.go @@ -31,17 +31,5 @@ func (kl *Kubelet) getRootDirContext() (string, error) { } // Get the SELinux context of the rootDir. - rootContext, err := selinux.Getfilecon(kl.getRootDir()) - if err != nil { - return "", err - } - - // There is a libcontainer bug where the null byte is not stripped from - // the result of reading some selinux xattrs; strip it. - // - // TODO: remove when https://github.com/docker/libcontainer/issues/499 - // is fixed - rootContext = rootContext[:len(rootContext)-1] - - return rootContext, nil + return selinux.Getfilecon(kl.getRootDir()) }