Skip to content

Commit b946acf

Browse files
committed
log_server_exit: log_server_close() expects the raw wait status
log_server_close() passes exit_status to fmt_exit_message() which needs the raw status value from wait(2).
1 parent 9ff27d2 commit b946acf

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

plugins/sudoers/audit.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,8 @@ log_server_exit(int status_type, int status)
326326
int exit_status = 0, error = 0;
327327

328328
if (status_type == SUDO_PLUGIN_WAIT_STATUS) {
329-
if (WIFEXITED(status))
330-
exit_status = WEXITSTATUS(status);
331-
else
332-
exit_status = WTERMSIG(status) | 128;
329+
/* Status from wait(2) et al. */
330+
exit_status = status;
333331
} else {
334332
/* Must be errno. */
335333
error = status;

0 commit comments

Comments
 (0)