Closed hhartzer closed 8 months ago
FreeBSD 14.0 introduced a new feature allowing for chroot as non-root. This might be nice to use here.
https://cgit.freebsd.org/src/commit/?id=a40cf4175c90
It seems fairly straight forward.
+ if (nonpriviledged) { + arg = PROC_NO_NEW_PRIVS_ENABLE; + error = procctl(P_PID, getpid(), PROC_NO_NEW_PRIVS_CTL, &arg); + if (error != 0) + err(1, "procctl"); + }
This might be wise to run (most of the time) even as root.
I'd be willing to merge a patch that did this. There's probably a set of #ifdefs that could detect FreeBSD 14+
#ifdefs
Sounds good, I can try to do that. Thanks!
FreeBSD 14.0 introduced a new feature allowing for chroot as non-root. This might be nice to use here.
https://cgit.freebsd.org/src/commit/?id=a40cf4175c90
It seems fairly straight forward.
This might be wise to run (most of the time) even as root.