mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 12:54:58 +00:00
Kernel: Check flags for MAP_FIXED instead of prot in sys$mmap
We were accidentally not enforcing the map_fixed pledge
This commit is contained in:
parent
6b08b18a9a
commit
01318d8f9b
1 changed files with 1 additions and 1 deletions
|
@ -141,7 +141,7 @@ ErrorOr<FlatPtr> Process::sys$mmap(Userspace<Syscall::SC_mmap_params const*> use
|
||||||
TRY(require_promise(Pledge::prot_exec));
|
TRY(require_promise(Pledge::prot_exec));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prot & MAP_FIXED || prot & MAP_FIXED_NOREPLACE) {
|
if (flags & MAP_FIXED || flags & MAP_FIXED_NOREPLACE) {
|
||||||
TRY(require_promise(Pledge::map_fixed));
|
TRY(require_promise(Pledge::map_fixed));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue