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
Notes: sideshowbarker 2024-07-19 06:49:48 +09:00

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;