From: Stéphane Graber Date: Mon, 16 Dec 2024 19:25:14 +0000 (-0500) Subject: lxc.init: Ignore user signals coming from inside the contianer X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d25e7f30693b4c72b2fadd0503f65cdd0cac53b5;p=thirdparty%2Flxc.git lxc.init: Ignore user signals coming from inside the contianer Signed-off-by: Stéphane Graber --- diff --git a/src/lxc/initutils.c b/src/lxc/initutils.c index 1cc1e695b..86b031c28 100644 --- a/src/lxc/initutils.c +++ b/src/lxc/initutils.c @@ -427,6 +427,11 @@ static sig_atomic_t was_interrupted; static void interrupt_handler(int sig, siginfo_t *info, void *context) { + // Only forward signals if they didn't originate from our own PID + // namespace and if no other signal is already being processed. + if (info->si_code == SI_USER && info->si_pid > 1) + return; + if (!was_interrupted) was_interrupted = sig; }