]> git.ipfire.org Git - thirdparty/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>
Thu, 23 Aug 2018 20:49:42 +0000 (22:49 +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 a92afe6c19f085202355a3506bc93bc747f61421..17dca1806faa0bc0dbd1ceeaa40b36df64b339cb 100644 (file)
@@ -1142,11 +1142,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);