mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-27 13:11:46 +03:00
Kernel: Require "stdio" pledge promise when calling get_root_session_id
This commit is contained in:
parent
a5ff6769f5
commit
16b6e644d7
Notes:
sideshowbarker
2024-07-17 03:16:02 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/16b6e644d7 Pull-request: https://github.com/SerenityOS/serenity/pull/16985 Reviewed-by: https://github.com/awesomekling
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user