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

Re: jls, jexec support


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 31 Jan 2005 08:56:40 -0800 (PST)

: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@xxxxxxxxxxxxx>



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