3 ms·
in linux, systemd can do that when starting a service. the config is in a unit file, not a library probably better, as such code is likely to be very unportabl
by unilynx 8y ago
in linux, systemd can do that when starting a service. the config is in a unit file, not a library
probably better, as such code is likely to be very unportable. even if you standardise the calls in a library, on linux the right paths will probably vary between distributions and architectures
- the8472 8y agoPledge and unveil allow you to do privileged setup within the process, e.g. obtaining a bunch of file descriptors, or doing other things that need caps, then holding onto them and then dropping those privs. That's not possible with an external container/sandbox launcher, you need to interleave it with the control flow. Seccomp&co are too low-level. Jail launchers are too coarse.