summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-07 15:39:28 +0200
committerGitHub <noreply@github.com>2019-06-07 15:39:28 +0200
commitbcc89e9d087c13ff9de3194bda85657465e9daef (patch)
treee8d68b78aedd050fd694d4804bbe49bad172c71f
parent346128792c9079d0092de4d84c16d63ce7df4515 (diff)
parent4dca13e70423e657aec98999d9c6803075359517 (diff)
downloadpodman-bcc89e9d087c13ff9de3194bda85657465e9daef.tar.gz
podman-bcc89e9d087c13ff9de3194bda85657465e9daef.tar.bz2
podman-bcc89e9d087c13ff9de3194bda85657465e9daef.zip
Merge pull request #3271 from giuseppe/rootless-skip-ns-resolution-on-old-kernels
rootless: skip NS_GET_PARENT on old kernels
-rw-r--r--pkg/rootless/rootless_linux.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/rootless/rootless_linux.go b/pkg/rootless/rootless_linux.go
index d302b1777..0cac50fc0 100644
--- a/pkg/rootless/rootless_linux.go
+++ b/pkg/rootless/rootless_linux.go
@@ -169,6 +169,9 @@ func getUserNSFirstChild(fd uintptr) (*os.File, error) {
for {
nextFd, err := getParentUserNs(fd)
if err != nil {
+ if err == syscall.ENOTTY {
+ return os.NewFile(fd, "userns child"), nil
+ }
return nil, errors.Wrapf(err, "cannot get parent user namespace")
}