From caa39474cbf0b03ea3afcd76fe2e49c4076a8f82 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Tue, 26 Jun 2018 17:33:16 +0800 Subject: [PATCH] Fix force denying on exit --- su.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/su.c b/su.c index 4841b057e..1261b9403 100644 --- a/su.c +++ b/su.c @@ -152,8 +152,7 @@ static void cleanup_signal(int sig) { __attribute__ ((noreturn)) void exit2(int status) { // Handle the pipe, or the daemon will get stuck if (su_ctx->pipefd[0] >= 0) { - int i = DENY; - xwrite(su_ctx->pipefd[1], &i, sizeof(i)); + xwrite(su_ctx->pipefd[1], &su_ctx->info->access.policy, sizeof(policy_t)); close(su_ctx->pipefd[0]); close(su_ctx->pipefd[1]); }