summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-07-01 22:57:37 +0200
committerGitHub <noreply@github.com>2019-07-01 22:57:37 +0200
commit3b9ce8a3accdc906fb0c6c51e61556c26fbc9a43 (patch)
tree73f46d256d0f2afd69435c26c3f7129804333054 /pkg
parent150778820f0f6d9f7ffdb672a8b136804378f025 (diff)
parent4b176d4f4573dbb6aea635a492b780b7c8cd0912 (diff)
downloadpodman-3b9ce8a3accdc906fb0c6c51e61556c26fbc9a43.tar.gz
podman-3b9ce8a3accdc906fb0c6c51e61556c26fbc9a43.tar.bz2
podman-3b9ce8a3accdc906fb0c6c51e61556c26fbc9a43.zip
Merge pull request #3468 from giuseppe/fix-sudo-rootless
rootless: do not join namespace if it has already euid == 0
Diffstat (limited to 'pkg')
-rw-r--r--pkg/rootless/rootless_linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c
index d58a08801..19b76f387 100644
--- a/pkg/rootless/rootless_linux.c
+++ b/pkg/rootless/rootless_linux.c
@@ -244,7 +244,7 @@ static void __attribute__((constructor)) init()
/* Shortcut. If we are able to join the pause pid file, do it now so we don't
need to re-exec. */
xdg_runtime_dir = getenv ("XDG_RUNTIME_DIR");
- if (xdg_runtime_dir && xdg_runtime_dir[0] && can_use_shortcut ())
+ if (geteuid () != 0 && xdg_runtime_dir && xdg_runtime_dir[0] && can_use_shortcut ())
{
int r;
int fd;