mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +00:00
Kernel: Change unveil state to dropped even when node already exists
This also changes the UnveilState to Dropped when the path unveil() is called for already has a node. This fixes a bug where unveiling "/" would previously keep the UnveilState as None, which meant that everything was still accessible until unveil() was called with any non-root path (or nullptr).
This commit is contained in:
parent
2fcebfd6a8
commit
8930db0900
1 changed files with 1 additions and 0 deletions
|
@ -116,6 +116,7 @@ KResultOr<int> Process::sys$unveil(Userspace<const Syscall::SC_unveil_params*> u
|
||||||
update_intermediate_node_permissions(matching_node, (UnveilAccess)new_permissions);
|
update_intermediate_node_permissions(matching_node, (UnveilAccess)new_permissions);
|
||||||
|
|
||||||
matching_node.set_metadata({ matching_node.path(), (UnveilAccess)new_permissions, true });
|
matching_node.set_metadata({ matching_node.path(), (UnveilAccess)new_permissions, true });
|
||||||
|
m_veil_state = VeilState::Dropped;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue