CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2026/05/17 19:25:10
Modified files:
sys/kern : vfs_syscalls.c
Log message:
Since libc (currently and probably forever) only calls __pledge_open()
with 3 flags (O_RDONLY, O_RDWR, and O_CLOEXEC) validate this before
calling deeper kernel code.
It is not trivial to check O_RDONLY because the flag isn't a bit in
the 3 (valid) states represented inside O_ACCMODE (which are converted
more carefully to FREAD|FWRITE nowadays). This brings me back to my youth
with the open(,3) bug...
ok beck