Don't set the command status in the closure when the command is suspended.

This should only be set for signals that terminate the process.
Fixes a bug where the sudo front-end could call the plugin close
function with a non-terminal signal argument.
This commit is contained in:
Todd C. Miller
2021-05-10 13:42:06 -06:00
parent 6cdf49d33d
commit 3147bbeb24

View File

@@ -1002,8 +1002,8 @@ backchannel_cb(int fd, int what, void *v)
/* Command exited or was killed, either way we are done. */
sudo_debug_printf(SUDO_DEBUG_INFO, "command exited or was killed");
sudo_ev_loopexit(ec->evbase);
*ec->cstat = cstat;
}
*ec->cstat = cstat;
break;
case CMD_ERRNO:
/* Monitor was unable to execute command or broken pipe. */