From 1aad7ab6fcc3afc5fab74a3c6a795d4e868942fa Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 14 Sep 2010 09:23:28 -0400 Subject: [PATCH] Reset signal mask at sudo startup time; we need to be able to rely on normal signal delivery to control the child process. --HG-- branch : 1.7 --- sudo.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sudo.c b/sudo.c index 0d314882f..3b9bd3f16 100644 --- a/sudo.c +++ b/sudo.c @@ -1057,10 +1057,15 @@ static void initial_setup() { int miss[3], devnull = -1; + sigset_t mask; #if defined(__linux__) || (defined(RLIMIT_CORE) && !defined(SUDO_DEVEL)) struct rlimit rl; #endif + /* Reset signal mask. */ + (void) sigfillset(&mask); + (void) sigprocmask(SIG_UNBLOCK, &mask, NULL); + #if defined(__linux__) /* * Unlimit the number of processes since Linux's setuid() will -- 2.40.0