jls, jexec support
Matthew Dillon
dillon at apollo.backplane.com
Mon Jan 31 08:57:33 PST 2005
:Hi all,
:the patch http://leaf.dragonflybsd.org/~joerg/jail.patch includes
:the jail enumeration code and jail_attach. It's partly based on
:FreeBSD's code, some parts are written from scratch.
:The jail_attach.2 man page is from the original submit of Paul Herman,
:I send him a mail off-list about the license.
:
:Matt, could you have a look over the namecache related parts, I'm not
:sure if they are correct. Is there a way to map a namecache entry back
:to a path? We could avoid storing the path in struct prison and
:reconstruct it on demand for jls.
:
:Joerg
Yes, generating a path from a namecache pointer is triival. Just
recurse up through the parent pointers and pull out the segment names
from the namecache structures encountered, with one or two special cases
when crossing mount points. So in your patch set you can tell
nlookup_init() to get the path directly from user space and not copy
it anywhere.
Then in sysctl_jail_list() you can regenerate the path from the
namecache pointer using a function similar to vn_fullpath() in
kern/vfs_cache.c. In fact, you could probably take that function and
split it into two pieces so you can call the second piece directly with
the ncp rather then a vnode.
-Matt
Matthew Dillon
<dillon at xxxxxxxxxxxxx>
More information about the Submit
mailing list