Commit caa39474 authored by topjohnwu's avatar topjohnwu

Fix force denying on exit

parent 30e45925
...@@ -152,8 +152,7 @@ static void cleanup_signal(int sig) { ...@@ -152,8 +152,7 @@ static void cleanup_signal(int sig) {
__attribute__ ((noreturn)) void exit2(int status) { __attribute__ ((noreturn)) void exit2(int status) {
// Handle the pipe, or the daemon will get stuck // Handle the pipe, or the daemon will get stuck
if (su_ctx->pipefd[0] >= 0) { if (su_ctx->pipefd[0] >= 0) {
int i = DENY; xwrite(su_ctx->pipefd[1], &su_ctx->info->access.policy, sizeof(policy_t));
xwrite(su_ctx->pipefd[1], &i, sizeof(i));
close(su_ctx->pipefd[0]); close(su_ctx->pipefd[0]);
close(su_ctx->pipefd[1]); close(su_ctx->pipefd[1]);
} }
......
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