While porting my application I noticed unveil(".", "rwc"); returns an error and sets errno = EINVAL on SerenityOS.
On OpenBSD this is valid.
I use the following code on OpenBSD to mark the filesystem read-only, except for the current directory:
https://codemadness.org/git/sfeed/file/sfeed_gopher.c.html#l132
In a nutshell:
unveil("/", "r");
unveil(".", "rwc");
pledge("stdio rpath wpath cpath", NULL);
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too