1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

Kernel: Add a 'no_error' pledge promise

This makes pledge() ignore promises that would otherwise cause it to
fail with EPERM, which is very useful for allowing programs to run under
a "jail" so to speak, without having them termiate early due to a
failing pledge() call.
This commit is contained in:
Ali Mohammad Pur 2022-03-25 01:17:42 +04:30 committed by Ali Mohammad Pur
parent 37073437c1
commit 8233da3398
3 changed files with 12 additions and 5 deletions

View file

@ -67,7 +67,8 @@ Time kgettimeofday();
__ENUMERATE_PLEDGE_PROMISE(setkeymap) \
__ENUMERATE_PLEDGE_PROMISE(prot_exec) \
__ENUMERATE_PLEDGE_PROMISE(map_fixed) \
__ENUMERATE_PLEDGE_PROMISE(getkeymap)
__ENUMERATE_PLEDGE_PROMISE(getkeymap) \
__ENUMERATE_PLEDGE_PROMISE(no_error)
enum class Pledge : u32 {
#define __ENUMERATE_PLEDGE_PROMISE(x) x,