mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
Kernel/Syscalls: Allow root to ptrace any process
Previously root (euid=0) was not able to ptrace any dumpable process as expected. This change fixes this.
This commit is contained in:
parent
8c7b393939
commit
ecbb1df01b
1 changed files with 1 additions and 2 deletions
|
@ -42,8 +42,7 @@ static ErrorOr<FlatPtr> handle_ptrace(Kernel::Syscall::SC_ptrace_params const& p
|
|||
|
||||
auto peer_credentials = peer->process().credentials();
|
||||
auto caller_credentials = caller.credentials();
|
||||
if ((peer_credentials->uid() != caller_credentials->euid())
|
||||
|| (peer_credentials->uid() != peer_credentials->euid())) // Disallow tracing setuid processes
|
||||
if (!caller_credentials->is_superuser() && ((peer_credentials->uid() != caller_credentials->euid()) || (peer_credentials->uid() != peer_credentials->euid()))) // Disallow tracing setuid processes
|
||||
return EACCES;
|
||||
|
||||
if (!peer->process().is_dumpable())
|
||||
|
|
Loading…
Add table
Reference in a new issue