Kernel: Do not require 'proc' promise in getsid() and getpgid()

These only require 'stdio' according to:
https://man.openbsd.org/pledge.2
This commit is contained in:
Timothy Flynn 2022-10-03 07:42:15 -04:00 committed by Andreas Kling
parent 74018be739
commit 97d15e9b8f
Notes: sideshowbarker 2024-07-17 08:37:36 +09:00

View file

@ -13,7 +13,7 @@ namespace Kernel {
ErrorOr<FlatPtr> Process::sys$getsid(pid_t pid)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
TRY(require_promise(Pledge::proc));
TRY(require_promise(Pledge::stdio));
if (pid == 0)
return sid().value();
auto process = Process::from_pid(pid);
@ -49,7 +49,7 @@ ErrorOr<FlatPtr> Process::sys$setsid()
ErrorOr<FlatPtr> Process::sys$getpgid(pid_t pid)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
TRY(require_promise(Pledge::proc));
TRY(require_promise(Pledge::stdio));
if (pid == 0)
return pgid().value();
auto process = Process::from_pid(pid);