1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

Kernel+Userland: Add "settime" pledge promise for setting system time

We now require the "settime" promise from pledged processes who want to
change the system time.
This commit is contained in:
Andreas Kling 2020-05-08 22:54:17 +02:00
parent 1cddb1055f
commit 5bfd893292
4 changed files with 29 additions and 22 deletions

View file

@ -4360,7 +4360,7 @@ int Process::sys$clock_gettime(clockid_t clock_id, timespec* user_ts)
int Process::sys$clock_settime(clockid_t clock_id, timespec* user_ts)
{
REQUIRE_PROMISE(stdio);
REQUIRE_PROMISE(settime);
if (!is_superuser())
return -EPERM;