mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
Kernel: Allow 'elevating' unveil permissions if implicitly inherited from '/'
This can happen when an unveil follows another with a path that is a sub-path of the other one: ```c++ unveil("/home/anon/.config/whoa.ini", "rw"); unveil("/home/anon", "r"); // this would fail, as "/home/anon" inherits // the permissions of "/", which is None. ```
This commit is contained in:
parent
3be9a9ac76
commit
7b5aa06702
3 changed files with 14 additions and 5 deletions
|
@ -640,7 +640,7 @@ private:
|
|||
u32 m_execpromises { 0 };
|
||||
|
||||
VeilState m_veil_state { VeilState::None };
|
||||
UnveilNode m_unveiled_paths { "/", { "/" } };
|
||||
UnveilNode m_unveiled_paths { "/", { .full_path = "/", .unveil_inherited_from_root = true } };
|
||||
|
||||
WaitQueue& futex_queue(Userspace<const i32*>);
|
||||
HashMap<u32, OwnPtr<WaitQueue>> m_futex_queues;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue