mirror of https://github.com/containers/podman.git
Merge pull request #3271 from giuseppe/rootless-skip-ns-resolution-on-old-kernels
rootless: skip NS_GET_PARENT on old kernels
This commit is contained in:
commit
bcc89e9d08
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue