Hello,
I am happy to announce a new version of restricted.
This library lets you limit which system operations and which parts of the filesystem your program can access. Call it as early as possible in your program so that the rest of the code runs with reduced privileges. Currently, actual enforced restrictions are implemented for these operating systems:
- OpenBSD
- Linux (only filesystem view)
Even on other operating systems, you can still use restricted to document which privileges your program needs. Users can then test if your program respects these promises with tools such as pledge on Linux. Enjoy ![]()
CHANGELOG:
- add Linux (only filesystem view) via landlock(7)
- except unlink/removing, whole other thing with LANDLOCK_ACCESS_FS_READ_FILE in landlock
- add Semantic Versioning
- change description to make it more clear
- tested with flambda switch on:
- x86_64-openbsd
- x86_64-arch-linux, x86_64-alpine-linux (Landlock ABI version: 7)