mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
Kernel: Support pledge() with empty promises
This tells the kernel that the process wants to use pledge, but without pledging anything - effectively restricting it to syscalls that don't require a certain promise. This is part of OpenBSD's pledge() as well, which served as basis for Serenity's.
This commit is contained in:
parent
b580c005f1
commit
629180b7d8
2 changed files with 5 additions and 9 deletions
|
@ -467,7 +467,7 @@ public:
|
|||
|
||||
bool has_promises() const
|
||||
{
|
||||
return m_promises;
|
||||
return m_has_promises;
|
||||
}
|
||||
bool has_promised(Pledge pledge) const
|
||||
{
|
||||
|
@ -637,6 +637,7 @@ private:
|
|||
|
||||
RefPtr<Timer> m_alarm_timer;
|
||||
|
||||
bool m_has_promises { false };
|
||||
u32 m_promises { 0 };
|
||||
u32 m_execpromises { 0 };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue