From: Todd C. Miller Date: Tue, 14 Sep 2010 13:23:28 +0000 (-0400) Subject: Reset signal mask at sudo startup time; we need to be able to rely on X-Git-Tag: SUDO_1_7_5~152 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1aad7ab6fcc3afc5fab74a3c6a795d4e868942fa;p=sudo 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 --- 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