mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:17:44 +00:00
Kernel: Properly reset m_unveiled_paths on execve()
When a process executes another program, its unveil state is reset. For this, we not only need to clear all nodes from m_unveiled_paths, but also reset the metadata of m_unveiled_paths (the root node) itself. This fixes the following bug: 1) A process unveils "/", then executes another program. 2) That other program also unveils some path. 3) "/" is now unveiled for the new program.
This commit is contained in:
parent
c1de46aaaf
commit
573664758a
1 changed files with 1 additions and 0 deletions
|
@ -553,6 +553,7 @@ KResult Process::do_exec(NonnullRefPtr<FileDescription> main_program_description
|
|||
|
||||
m_veil_state = VeilState::None;
|
||||
m_unveiled_paths.clear();
|
||||
m_unveiled_paths.set_metadata({ "/", UnveilAccess::None, false });
|
||||
|
||||
m_coredump_metadata.clear();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue