Kernel: Require "stdio" pledge promise when calling get_root_session_id

This commit is contained in:
Liav A 2023-01-13 01:00:27 +02:00 committed by Andreas Kling
parent a5ff6769f5
commit 16b6e644d7
Notes: sideshowbarker 2024-07-17 03:16:02 +09:00

View File

@ -141,6 +141,7 @@ ErrorOr<FlatPtr> Process::sys$setpgid(pid_t specified_pid, pid_t specified_pgid)
ErrorOr<FlatPtr> Process::sys$get_root_session_id(pid_t force_sid)
{
TRY(require_promise(Pledge::stdio));
pid_t sid = (force_sid == -1) ? this->sid().value() : force_sid;
if (sid == 0)
return 0;