Initial implementation of a sandbox for OpenBSD #545
+110
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Leverages pledge and unveil, and leaves a public API for other systems to follow. The API was designed to match the OpenBSD side pretty closely as that's the initial target, if a BPF/capsicum implementation is brought forward it may be worth changing the API, and we should be okay with that. (Neither of those targets are on my current list of things to actively implement).
I've been using this locally for a bit on an OpenBSD system, can confirmed that a Linux build still works fine on a quick test. I've invoked transcoding, the only major feature I haven't touched that I'm tracking is jukebox, which I'm not really sure how it's supposed to be working yet. I also was unsure how to invoke the database upgrade path that I can ensure works.
This is the first time I've done anything with Go, so any criticisms are welcome.