CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2026/09/01 07:56:12
Modified files:
usr.bin/mandoc : cgi.c
Log message:
Use unveil(2) and clamp down on pledge(2).
The main() program establishes a baseline, allowing the maximum
that might ever be needed: stdio rpath and read access to the MAN_DIR.
The top level page generators (pg_show, pg_search) narrow unveil(2)
to the specific manual page tree selected by the user.
When the selected manual page file has been opened, the pledge is narrowed
to just stdio (in resp_catman, resp_format, pg_searchres, pg_index).
Except for internal errors and bad requests, which error out early,
exactly one of these narrowing codepaths is always trodden.