jls(8), jexec(8) and jail_attach(2) port

Paul Herman pherman at frenchfries.net
Sun Mar 21 15:28:40 PST 2004


Hi,

I've ported jls(8) & jexec(8) from FreeBSD to DragonFly.  This
let's you list the active jails and execute commands in them.  It
works for me, but I'm sure there is room for improvement.  I've
attached two files:

  * tar file to be extracted in /usr/src.  Sorry it's not a patch(1)
    file, I can't get patch(1) to create files.  Something like this
    should do the trick:
      + cd /usr/src && tar xzf jail.tar.gz
      + cd sys/kern && make sysent
      + cd /usr/src && make world

  * a side dish of mdoc patch to update FreeBSD versions and fix a
    <tab> character in the DragonFly declaration.

There is one known bug (see "Minor jail bug..." post to bugs@
yesterday) which leaves a jail hanging around upon exit if you
fork/exec a process inside a jail.  At the moment I'm not quite
sure how that should be addressed.

I'm also not sure how to lock the prisons structure in critical
sections (crit_enter()/crit_exit() seems kinda harsh) so any
tips/suggestions are welcome.  Other than that, enjoy!

-Paul.Attachment:
jail.tar.gz
Description: Binary data
Attachment:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00018.bin
Type: application/octet-stream
Size: 329 bytes
Desc: "Description: Binary data"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20040321/24419cf5/attachment-0036.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00017.bin
Type: application/octet-stream
Size: 32083 bytes
Desc: "mdoc.patch.gz"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20040321/24419cf5/attachment-0037.bin>


More information about the Submit mailing list