summaryrefslogtreecommitdiff
path: root/pkg/rootless/rootless_linux.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-02-25 17:45:42 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-02-25 18:15:29 +0100
commit6dbb89e56c476d41ef63ad828ebdc549ce276c85 (patch)
tree4ada7625415d074f8af7840f2fd9058549f6b99e /pkg/rootless/rootless_linux.go
parent3d37dc639d87e4469a6457cf4592ff5b773d0777 (diff)
downloadpodman-6dbb89e56c476d41ef63ad828ebdc549ce276c85.tar.gz
podman-6dbb89e56c476d41ef63ad828ebdc549ce276c85.tar.bz2
podman-6dbb89e56c476d41ef63ad828ebdc549ce276c85.zip
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 e9dc2120925d9bc32b87ed3c4122aa40f7413db5 introduced this regression. Closes: https://github.com/containers/libpod/issues/5246 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/rootless/rootless_linux.go')
-rw-r--r--pkg/rootless/rootless_linux.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/rootless/rootless_linux.go b/pkg/rootless/rootless_linux.go
index f71d55776..5ddfab7ad 100644
--- a/pkg/rootless/rootless_linux.go
+++ b/pkg/rootless/rootless_linux.go
@@ -510,7 +510,7 @@ func TryJoinFromFilePaths(pausePidPath string, needNewNamespace bool, paths []st
}
}
}
- if !foundProcess {
+ if !foundProcess && pausePidPath != "" {
return BecomeRootInUserNS(pausePidPath)
}
if lastErr != nil {