Commit 51ff7246 authored by topjohnwu's avatar topjohnwu

Unblock all signals in root shell process

Fix #1563
parent 291bf93f
...@@ -352,6 +352,10 @@ void su_daemon_handler(int client, struct ucred *credential) { ...@@ -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); set_identity(ctx.req.uid);
execvp(ctx.req.shell, (char **) argv); execvp(ctx.req.shell, (char **) argv);
fprintf(stderr, "Cannot execute %s: %s\n", ctx.req.shell, strerror(errno)); fprintf(stderr, "Cannot execute %s: %s\n", ctx.req.shell, strerror(errno));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment