3 ms·
openbsd has a simple api, pledge() [0]. The seccomp APIs are more powerful, but also more difficult to use. Are there simplified wrappers available for them tha
by the8472 10y ago
openbsd has a simple api, pledge() [0]. The seccomp APIs are more powerful, but also more difficult to use. Are there simplified wrappers available for them that provide something akin to pledge that could just be sprinkled into your application startup?
[0] https://www.openbsd.org/papers/hackfest2015-pledge/mgp00001.html https://www.openbsd.org/papers/hackfest2015-pledge/mgp00001....
- viraptor 10y agoThere's libseccomp which provides nice interface, but still at syscall level. You can't easily implement pledge interface on seccomp, because you can't dereference pointers in BPF. So if you want to support both, you'll have to do a bit of rearchitecture anyway. But it's not very hard. Mostly a: implement was you know, (see if all works, add missing calls, repeat)+ process