1
Fork 0
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:
Andreas Kling 2020-05-08 22:47:21 +02:00
parent 652b22ee9c
commit 1cddb1055f

View file

@ -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;