DragonFly BSD
DragonFly submit List (threaded) for 2004-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Paul Herman <pherman@xxxxxxxxxxxxxxx>
Date: Sun, 21 Mar 2004 15:27:38 -0800 (PST)

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: mdoc.patch.gz
Description: Binary data



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]