mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
Kernel: Make the purge() syscall superuser-only
I don't think we need to give unprivileged users access to what is essentially a kernel testing mechanism.
This commit is contained in:
@@ -463,6 +463,8 @@ int Process::sys$madvise(void* address, size_t size, int advice)
|
||||
|
||||
int Process::sys$purge(int mode)
|
||||
{
|
||||
if (!is_superuser())
|
||||
return -EPERM;
|
||||
int purged_page_count = 0;
|
||||
if (mode & PURGE_ALL_VOLATILE) {
|
||||
NonnullRefPtrVector<PurgeableVMObject> vmobjects;
|
||||
|
||||
Reference in New Issue
Block a user