2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00

Only call ptrace_verify_post_exec() for intercept, not log_subcmds.

This commit is contained in:
Todd C. Miller 2023-06-05 16:03:03 -06:00
parent 2392ee9d7d
commit 245c56bac1

View File

@ -1936,7 +1936,7 @@ ptrace_intercept_execve(pid_t pid, struct intercept_closure *closure)
}
}
if (closure->state == POLICY_ACCEPT) {
if (ISSET(closure->details->flags, CD_INTERCEPT_VERIFY)) {
if (ISSET(closure->details->flags, CD_INTERCEPT|CD_INTERCEPT_VERIFY)) {
/* Verify execve(2) args post-exec. */
if (!ptrace_verify_post_exec(pid, &regs, closure)) {
if (errno != ESRCH)