From: Todd C. Miller Date: Sun, 9 Dec 2001 05:20:34 +0000 (+0000) Subject: Must reset signal handlers before we exec X-Git-Tag: SUDO_1_6_4~145 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4cad1daa76555f737cc9ed5255afe068c5a06d96;p=sudo Must reset signal handlers before we exec --- diff --git a/sudo.c b/sudo.c index 10fbf81f0..f61b2e967 100644 --- a/sudo.c +++ b/sudo.c @@ -333,6 +333,14 @@ main(argc, argv, envp) "please report this error at http://courtesan.com/sudo/bugs/"); } + /* Reset signal handlers before we exec. */ + sigemptyset(&sa.sa_mask); + sa.sa_flags = SA_RESTART; + sa.sa_handler = SIG_DFL; + (void) sigaction(SIGINT, &sa, NULL); + (void) sigaction(SIGQUIT, &sa, NULL); + (void) sigaction(SIGTSTP, &sa, NULL); + /* Close the password file */ endpwent();