mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 13:28:10 +00:00
Reset signal mask at sudo startup time; we need to be able to rely on
normal signal delivery to control the child process.
This commit is contained in:
parent
607eab1151
commit
01c7840dc5
@ -111,6 +111,7 @@ main(int argc, char *argv[], char *envp[])
|
||||
char **user_info, **command_info, **argv_out, **user_env_out;
|
||||
struct plugin_container *plugin, *next;
|
||||
struct command_details command_details;
|
||||
sigset_t mask;
|
||||
int ok;
|
||||
#if defined(SUDO_DEVEL) && defined(__OpenBSD__)
|
||||
extern char *malloc_options;
|
||||
@ -129,7 +130,9 @@ main(int argc, char *argv[], char *envp[])
|
||||
if (geteuid() != 0)
|
||||
errorx(1, "must be setuid root");
|
||||
|
||||
/* Turn off core dumps and make sure fds 0-2 are open. */
|
||||
/* Reset signal mask, disable core dumps and make sure fds 0-2 are open. */
|
||||
(void) sigfillset(&mask);
|
||||
(void) sigprocmask(SIG_UNBLOCK, &mask, NULL);
|
||||
disable_coredumps();
|
||||
fix_fds();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user