mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:47:34 +00:00
Kernel: Set the dumpable flag before switching spaces in sys$execve()
This commit is contained in:
parent
d746639171
commit
45231051e6
1 changed files with 2 additions and 2 deletions
|
@ -501,6 +501,8 @@ int Process::do_exec(NonnullRefPtr<FileDescription> main_program_description, Ve
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_dumpable(!executable_is_setid);
|
||||||
|
|
||||||
m_space = load_result.space.release_nonnull();
|
m_space = load_result.space.release_nonnull();
|
||||||
MemoryManager::enter_space(*m_space);
|
MemoryManager::enter_space(*m_space);
|
||||||
|
|
||||||
|
@ -525,8 +527,6 @@ int Process::do_exec(NonnullRefPtr<FileDescription> main_program_description, Ve
|
||||||
|
|
||||||
clear_futex_queues_on_exec();
|
clear_futex_queues_on_exec();
|
||||||
|
|
||||||
set_dumpable(!executable_is_setid);
|
|
||||||
|
|
||||||
for (size_t i = 0; i < m_fds.size(); ++i) {
|
for (size_t i = 0; i < m_fds.size(); ++i) {
|
||||||
auto& description_and_flags = m_fds[i];
|
auto& description_and_flags = m_fds[i];
|
||||||
if (description_and_flags.description() && description_and_flags.flags() & FD_CLOEXEC)
|
if (description_and_flags.description() && description_and_flags.flags() & FD_CLOEXEC)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue