1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 05:47:34 +00:00

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
parent 200a5b0649
commit 1b3cac2f42

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