]> git.proxmox.com Git - mirror_lxc.git/commitdiff
start: always make us dumpable
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 26 Mar 2018 21:03:28 +0000 (23:03 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 26 Mar 2018 21:04:12 +0000 (23:04 +0200)
Otherwise lxc.hook.mount hooks that try to inspect /proc/<pid>/*
will fail.

Cc: Jonathan Calmels <jcalmels@nvidia.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c

index c728a62be4ca9348db8ceff5fda060bf15bfd16e..f66f50a7b8fe888773a00f7f14d30a19c710bf8b 100644 (file)
@@ -1105,11 +1105,9 @@ static int do_start(void *data)
                if (ret < 0 && (handler->am_root || errno != EPERM))
                        goto out_warn_father;
 
-               if (!handler->am_root) {
-                       ret = prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
-                       if (ret < 0)
-                               goto out_warn_father;
-               }
+               ret = prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
+               if (ret < 0)
+                       goto out_warn_father;
 
                /* set{g,u}id() clears deathsignal */
                ret = lxc_set_death_signal(SIGKILL);