]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
start: Re-introduce first SET_DUMPABLE call 4536/head
authorStéphane Graber <stgraber@stgraber.org>
Sat, 5 Apr 2025 05:11:18 +0000 (01:11 -0400)
committerStéphane Graber <stgraber@stgraber.org>
Sat, 5 Apr 2025 05:11:18 +0000 (01:11 -0400)
Without it, we're running into issues with complex hooks like nvidia.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
src/lxc/start.c

index f28bceaba623d07463daab1689c7db9f85bb8424..ee4bf4003bdc5d34946ea416eae4dbda4fa82146 100644 (file)
@@ -1125,6 +1125,11 @@ static int do_start(void *data)
                if (!lxc_switch_uid_gid(nsuid, nsgid))
                        goto out_warn_father;
 
+               ret = prctl(PR_SET_DUMPABLE, prctl_arg(1), prctl_arg(0),
+                           prctl_arg(0), prctl_arg(0));
+               if (ret < 0)
+                       goto out_warn_father;
+
                /* set{g,u}id() clears deathsignal */
                ret = lxc_set_death_signal(SIGKILL, handler->monitor_pid, status_fd);
                if (ret < 0) {