mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
Kernel: Don't allow to kill kernel processes
The protection was only for SIGKILL before.
This commit is contained in:
parent
072c264a04
commit
6efcc2fc99
1 changed files with 2 additions and 2 deletions
|
@ -14,8 +14,8 @@ KResult Process::do_kill(Process& process, int signal)
|
|||
// FIXME: Should setuid processes have some special treatment here?
|
||||
if (!is_superuser() && euid() != process.uid() && uid() != process.uid())
|
||||
return EPERM;
|
||||
if (process.is_kernel_process() && signal == SIGKILL) {
|
||||
dbgln("Aattempted to send SIGKILL to kernel process {} ({})", process.name(), process.pid());
|
||||
if (process.is_kernel_process()) {
|
||||
dbgln("Attempted to send signal {} to kernel process {} ({})", signal, process.name(), process.pid());
|
||||
return EPERM;
|
||||
}
|
||||
if (signal != 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue