summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls/fork.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-03-10 22:50:00 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-10 22:50:00 +0100
commitde6c5128fd5d6250879b4cf5df67bcbff576da7a (patch)
tree3c03f33c715209cfab73902345a5eabac8cbd8ea /Kernel/Syscalls/fork.cpp
parent37ad8806606270e469a96cfbca33f9512ba11804 (diff)
downloadserenity-de6c5128fd5d6250879b4cf5df67bcbff576da7a.zip
Kernel: Move process pledge promises into protected data
Diffstat (limited to 'Kernel/Syscalls/fork.cpp')
-rw-r--r--Kernel/Syscalls/fork.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/Syscalls/fork.cpp b/Kernel/Syscalls/fork.cpp
index 26d9bd96ee..1ce770875d 100644
--- a/Kernel/Syscalls/fork.cpp
+++ b/Kernel/Syscalls/fork.cpp
@@ -41,10 +41,6 @@ KResultOr<pid_t> Process::sys$fork(RegisterState& regs)
return ENOMEM;
child->m_root_directory = m_root_directory;
child->m_root_directory_relative_to_global_root = m_root_directory_relative_to_global_root;
- child->m_promises = m_promises;
- child->m_execpromises = m_execpromises;
- child->m_has_promises = m_has_promises;
- child->m_has_execpromises = m_has_execpromises;
child->m_veil_state = m_veil_state;
child->m_unveiled_paths = m_unveiled_paths.deep_copy();
child->m_fds = m_fds;
@@ -54,6 +50,10 @@ KResultOr<pid_t> Process::sys$fork(RegisterState& regs)
{
MutableProtectedData child_data { *child };
+ child_data->promises = protected_data().promises;
+ child_data->execpromises = protected_data().execpromises;
+ child_data->has_promises = protected_data().has_promises;
+ child_data->has_execpromises = protected_data().has_execpromises;
child_data->sid = this->sid();
child_data->extra_gids = this->extra_gids();
}