From 1cddb1055f8e481eccc77a2ac0db4538e2812c1a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 8 May 2020 22:47:21 +0200 Subject: Kernel: Only allow superuser to call sys$clock_settime() --- Kernel/Process.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Kernel') diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 35fa98af12..c4231201a9 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -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; -- cgit v1.2.3