Change bectl to read in -o flags and put them in a nvlist
then depending on whether we are interactive or not, use libjail
or the jail command to initalize our jail.
Details
- Reviewers
kevans - Commits
- rS345302: bectl(8): change jail command to execute jail(8)
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 22708 Build 21806: arc lint + arc unit
Event Timeline
As we discussed, I no longer have any qualms with dropping jail(3) completely and proxying it all through to jail(8).
sbin/bectl/bectl_jail.c | ||
---|---|---|
72 | style(9) nit: there should be a blank line following any declarations, or simply a blank line at the beginning if there are no declarations. | |
79 | Same as above: blank line before nvlist_remove_all. | |
97 | This looks like an accidental trailing space crawled in | |
302 | No spaces around these and a space after the parentheses before the opening brace.; if (nvlist_exists(...) || nvlist_exists(...)) { (with wrapping, of course) | |
327 | Space before the opening brace here | |
339 | Take a look at sbuf(9) for this; you can drop all of the argument tracking in favor of sbuf_new_auto() and a series of sbuf_cat()/sbuf_printf() depending on whether you need formatting or you're just appending /usr/sbin/jail. | |
352 | Spacing |
Remove mounts created by the jail(8) command. prevent unwanted param arguments.
Clean up jail assets on effort basis.