Correct error message when command doesn't exist in intercept mode.
Previously, we would always use EACCES, even when ENOENT was appropriate. This also affected log_subcmds.
This commit is contained in:
@@ -1920,9 +1920,12 @@ ptrace_intercept_execve(pid_t pid, struct intercept_closure *closure)
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
case POLICY_REJECT:
|
||||
/* If rejected, fake the syscall and set return to EACCES */
|
||||
ptrace_fail_syscall(pid, ®s, EACCES);
|
||||
errno = EACCES;
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
ptrace_fail_syscall(pid, ®s, errno);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user