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:
parent
1cddb1055f
commit
5bfd893292
4 changed files with 29 additions and 22 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue