mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 19:25: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);
|
REQUIRE_PROMISE(stdio);
|
||||||
|
|
||||||
|
if (!is_superuser())
|
||||||
|
return -EPERM;
|
||||||
|
|
||||||
timespec ts;
|
timespec ts;
|
||||||
if (!validate_read_and_copy_typed(&ts, user_ts))
|
if (!validate_read_and_copy_typed(&ts, user_ts))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue