mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Kernel: Only allow superuser to call sys$clock_settime()
This commit is contained in:
parent
652b22ee9c
commit
1cddb1055f
Notes:
sideshowbarker
2024-07-19 06:49:48 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1cddb1055f8
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…
Reference in a new issue