summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-01-21 11:42:28 +0100
committerAndreas Kling <kling@serenityos.org>2020-01-21 11:42:28 +0100
commit1b3cac2f42ea8dd9026b541bc705f5909fef71ed (patch)
treedd6b52bdaa929b0b50683c7bdb496de252511aac /Kernel
parent200a5b0649f3c0d1df117beb55bdeffba0ce9451 (diff)
downloadserenity-1b3cac2f42ea8dd9026b541bc705f5909fef71ed.zip
Kernel: Don't forget about unveiled paths with zero permissions
We need to keep these around, otherwise the calling process can remove and re-add a path to increase its permissions.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Process.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 1bc28a11d1..6be807edaa 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -4657,10 +4657,6 @@ int Process::sys$unveil(const Syscall::SC_unveil_params* user_params)
if (unveiled_path.path == path.value()) {
if (new_permissions & ~unveiled_path.permissions)
return -EPERM;
- if (!new_permissions) {
- m_unveiled_paths.remove(i);
- return 0;
- }
unveiled_path.permissions = new_permissions;
return 0;
}