mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Remove workaround for libcontainer Getfilecon bug
https://github.com/docker/libcontainer/issues/499 has been fixed
This commit is contained in:
parent
e2bf59f57c
commit
68f22a40f3
@ -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())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user