diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-07 15:39:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-07 15:39:28 +0200 |
commit | bcc89e9d087c13ff9de3194bda85657465e9daef (patch) | |
tree | e8d68b78aedd050fd694d4804bbe49bad172c71f | |
parent | 346128792c9079d0092de4d84c16d63ce7df4515 (diff) | |
parent | 4dca13e70423e657aec98999d9c6803075359517 (diff) | |
download | podman-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.go | 3 |
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") } |