Skip to content

Commit

Permalink
Merge pull request #3271 from giuseppe/rootless-skip-ns-resolution-on…
Browse files Browse the repository at this point in the history
…-old-kernels

rootless: skip NS_GET_PARENT on old kernels
  • Loading branch information
openshift-merge-robot authored Jun 7, 2019
2 parents 3461287 + 4dca13e commit bcc89e9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/rootless/rootless_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit bcc89e9

Please sign in to comment.