mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 13:15:07 +00:00
Kernel: Only allow superuser to call sys$clock_settime()
This commit is contained in:
parent
652b22ee9c
commit
1cddb1055f
1 changed files with 3 additions and 0 deletions
|
@ -4362,6 +4362,9 @@ int Process::sys$clock_settime(clockid_t clock_id, timespec* user_ts)
|
|||
{
|
||||
REQUIRE_PROMISE(stdio);
|
||||
|
||||
if (!is_superuser())
|
||||
return -EPERM;
|
||||
|
||||
timespec ts;
|
||||
if (!validate_read_and_copy_typed(&ts, user_ts))
|
||||
return -EFAULT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue