Use SIG_SETMASK when resetting signal mask instead of SIG_UNBLOCK.

This commit is contained in:
Todd C. Miller
2010-09-14 09:25:52 -04:00
parent 01c7840dc5
commit ece29bdea1

View File

@@ -131,8 +131,8 @@ main(int argc, char *argv[], char *envp[])
errorx(1, "must be setuid root");
/* Reset signal mask, disable core dumps and make sure fds 0-2 are open. */
(void) sigfillset(&mask);
(void) sigprocmask(SIG_UNBLOCK, &mask, NULL);
(void) sigemptyset(&mask);
(void) sigprocmask(SIG_SETMASK, &mask, NULL);
disable_coredumps();
fix_fds();