summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-08-02 14:42:39 -0400
committerGitHub <noreply@github.com>2018-08-02 14:42:39 -0400
commit9f2da6f59fcb8fe07906d20c89696e43774b9eb1 (patch)
tree986a57ed7813112bdb3c0b5daaad4412f53c789c
parentd55445d77f8eec5b91cc5d644e97e15f88b2f917 (diff)
parentc7b6403ae5fa4ae6f581b45d0e34a9ffe149c3a3 (diff)
downloadpodman-9f2da6f59fcb8fe07906d20c89696e43774b9eb1.tar.gz
podman-9f2da6f59fcb8fe07906d20c89696e43774b9eb1.tar.bz2
podman-9f2da6f59fcb8fe07906d20c89696e43774b9eb1.zip
Merge pull request #1201 from giuseppe/fix-segfault-rootless
rootless: do not segfault if the parent already died
-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);