rootless: become root only if the pause file is specified
we need to store the pause process PID file so that it can be re-used
later.
commit introduced this
regression.
Closes:
@@ -510,7 +510,7 @@ func TryJoinFromFilePaths(pausePidPath string, needNewNamespace bool, paths []st
}
}
}
- if !foundProcess {
+ if !foundProcess && pausePidPath != "" {
return BecomeRootInUserNS(pausePidPath)
}
if lastErr != nil {
