From d788372535b2bdf186dfe63e93683337039d3e35 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Mon, 26 Mar 2018 23:03:28 +0200 Subject: [PATCH] start: always make us dumpable Otherwise lxc.hook.mount hooks that try to inspect /proc//* will fail. Cc: Jonathan Calmels Signed-off-by: Christian Brauner --- src/lxc/start.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lxc/start.c b/src/lxc/start.c index c728a62be..f66f50a7b 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -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);