[PATCH] split chroot(9) into kern_chroot() and chroot()
Paul Herman
pherman at frenchfries.net
Mon Mar 15 20:14:24 PST 2004
Hey there,
As just mentioned on kernel@, I'm porting jail_attach(2) from
FreeBSD and ran into a snag because I needed to call chroot() from
within the kernel. The attached patch will help by splitting
chroot() into kern_chroot() and the syscall hook.
Perhaps the only oddity is that kern_chroot() takes a struct vnode*
rather than struct nameidata*. This is intentional because I will
need to call kern_chroot() from jail_attach() with only a vnode
reference available to me. Not the same as most other kern_*
functions, but it should be OK.
I've got this running now and it seems to work, but I'd appreciate
any comments/suggestions. Thanks!
-Paul.Attachment:
vfs01.patch.gz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00015.bin
Type: application/octet-stream
Size: 1455 bytes
Desc: "Description: Binary data"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20040315/e27a03b5/attachment-0018.bin>
More information about the Submit
mailing list