Page MenuHomeFreeBSD

beep: Capsicumize
ClosedPublic

Authored by emaste on Thu, Jun 5, 11:45 PM.
Tags
None
Referenced Files
F121981982: D50709.diff
Tue, Jul 1, 4:19 AM
Unknown Object (File)
Mon, Jun 30, 3:12 AM
Unknown Object (File)
Sun, Jun 29, 2:07 AM
Unknown Object (File)
Fri, Jun 27, 10:15 PM
Unknown Object (File)
Tue, Jun 24, 3:00 PM
Unknown Object (File)
Mon, Jun 23, 12:39 AM
Unknown Object (File)
Sat, Jun 21, 12:37 PM
Unknown Object (File)
Fri, Jun 20, 11:05 PM

Details

Summary

check caph_enter() failure

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

What is the rationale behind this change?

What is the rationale behind this change?

It is unlikely that beep will be used in a context where sandboxing would be valuable but it is a simple demonstration of a capability sandbox and is easy/low-cost to do.

markj added inline comments.
usr.bin/beep/beep.c
208

caph_enter() still needs error checking.

It's a nice example of how easy example how to use Capsicum by opening all resources before entering capability mode, but would better to call cap_enter() instead of caph_enter()?

emaste edited the summary of this revision. (Show Details)

better to call cap_enter() instead of caph_enter()?

caph_enter is a very small wrapper that just ignores ENOSYS in case it's running on a kernel compiled without options CAPABILITY_MODE. If we remove that as an option we could stop doing this

This revision is now accepted and ready to land.Tue, Jun 17, 6:11 PM
This revision was automatically updated to reflect the committed changes.