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.
This commit is contained in:
Andreas Kling 2020-01-21 11:42:28 +01:00
commit 1b3cac2f42
Notes: sideshowbarker 2024-07-19 09:55:19 +09:00

View file

@ -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;
}