Unblock all signals in root shell process

Fix #1563
This commit is contained in:
topjohnwu 2019-07-07 12:30:57 -07:00
parent 291bf93f9d
commit 51ff724691

View File

@ -352,6 +352,10 @@ void su_daemon_handler(int client, struct ucred *credential) {
}
}
// Unblock all signals
sigset_t block_set;
sigemptyset(&block_set);
sigprocmask(SIG_SETMASK, &block_set, nullptr);
set_identity(ctx.req.uid);
execvp(ctx.req.shell, (char **) argv);
fprintf(stderr, "Cannot execute %s: %s\n", ctx.req.shell, strerror(errno));