Landlock (kernel 5.13+) lets an unprivileged process restrict its own filesystem access before exec with no external dependencies, no setuid. Newer kernels also support TCP bind/connect restrictions. It has no PID or display isolation, but keeping games out of $HOME secrets is the main goal.
Also consider it for use inside of flatpak.
Things to check:
- https://github.com/landlock-lsm/go-landlock for applying rules pre-exec from Go
- whether Landlock syscalls pass Flatpak's seccomp filter
- feature detection and fallback across kernel ABI versions
- where it fits in auto selection: fallback when bwrap is missing, or layered under it
Landlock (kernel 5.13+) lets an unprivileged process restrict its own filesystem access before exec with no external dependencies, no setuid. Newer kernels also support TCP bind/connect restrictions. It has no PID or display isolation, but keeping games out of $HOME secrets is the main goal.
Also consider it for use inside of flatpak.
Things to check: