mirror of
https://github.com/containers/podman.git
synced 2025-05-22 09:36:57 +08:00
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:
@ -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")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user