From 61bd59c733f1e6956e7d2413456e5c2baf73a622 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 27 Aug 1999 21:02:24 +0000 Subject: [PATCH] Only block SIGINT, SIGQUIT, SIGTSTP (which can be generated from the keyboard). Since we run with ruid/euid == 0 the user can't really signal us in nasty ways. --- sudo.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sudo.c b/sudo.c index efca1bffa..bc39daacc 100644 --- a/sudo.c +++ b/sudo.c @@ -201,15 +201,17 @@ main(argc, argv) #endif /* POSIX_SIGNALS */ /* - * Block signals so the user cannot kill us at some point and + * Block signals so the user cannot interrupt us at some point and * avoid the logging. */ #ifdef POSIX_SIGNALS - (void) sigfillset(&set); - (void) sigdelset(&set, SIGCHLD); + (void) sigemptyset(&set); + (void) sigaddset(&set, SIGINT); + (void) sigaddset(&set, SIGQUIT); + (void) sigaddset(&set, SIGTSTP); (void) sigprocmask(SIG_BLOCK, &set, &oset); #else - omask = sigblock(sigmask(SIGHUP)|sigmask(SIGINT)|sigmask(SIGQUIT)|sigmask(SIGILL)|sigmask(SIGTSTP)); + omask = sigblock(sigmask(SIGINT)|sigmask(SIGQUIT)|sigmask(SIGTSTP)); #endif /* POSIX_SIGNALS */ /* -- 2.50.1