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

Kernel: Set the dumpable flag before switching spaces in sys$execve()

This commit is contained in:
Andreas Kling 2021-02-08 19:15:42 +01:00
parent d746639171
commit 45231051e6

View file

@ -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();
MemoryManager::enter_space(*m_space);
@ -525,8 +527,6 @@ int Process::do_exec(NonnullRefPtr<FileDescription> main_program_description, Ve
clear_futex_queues_on_exec();
set_dumpable(!executable_is_setid);
for (size_t i = 0; i < m_fds.size(); ++i) {
auto& description_and_flags = m_fds[i];
if (description_and_flags.description() && description_and_flags.flags() & FD_CLOEXEC)