summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-08-02 14:26:40 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2018-08-02 14:29:50 +0200
commitc7b6403ae5fa4ae6f581b45d0e34a9ffe149c3a3 (patch)
tree6e587cceedc7ff045d107106478d5316578da9dd /pkg
parenta8ae7eae9c9e545b685abfd1e42a2a63cb547a80 (diff)
downloadpodman-c7b6403ae5fa4ae6f581b45d0e34a9ffe149c3a3.tar.gz
podman-c7b6403ae5fa4ae6f581b45d0e34a9ffe149c3a3.tar.bz2
podman-c7b6403ae5fa4ae6f581b45d0e34a9ffe149c3a3.zip
rootless: do not segfault if the parent already died
Closes: https://github.com/projectatomic/libpod/issues/1189 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/rootless/rootless_linux.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c
index 465feeb57..84fac238f 100644
--- a/pkg/rootless/rootless_linux.c
+++ b/pkg/rootless/rootless_linux.c
@@ -97,6 +97,8 @@ reexec_in_user_namespace(int ready)
return pid;
argv = get_cmd_line_args (ppid);
+ if (argv == NULL)
+ _exit (EXIT_FAILURE);
setenv ("_LIBPOD_USERNS_CONFIGURED", "init", 1);
setenv ("_LIBPOD_ROOTLESS_UID", uid, 1);