Add intercept_verify sudoers option to control execve(2) argument checking.
This commit is contained in:
@@ -1532,10 +1532,12 @@ ptrace_intercept_execve(pid_t pid, struct intercept_closure *closure)
|
||||
}
|
||||
}
|
||||
if (closure->state == POLICY_ACCEPT) {
|
||||
/* Verify execve(2) args post-exec. */
|
||||
if (!ptrace_verify_post_exec(pid, ®s, closure)) {
|
||||
if (errno != ESRCH)
|
||||
kill(pid, SIGKILL);
|
||||
if (ISSET(closure->details->flags, CD_INTERCEPT_VERIFY)) {
|
||||
/* Verify execve(2) args post-exec. */
|
||||
if (!ptrace_verify_post_exec(pid, ®s, closure)) {
|
||||
if (errno != ESRCH)
|
||||
kill(pid, SIGKILL);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user