From: | Paul Herman <pherman@xxxxxxxxxxxxxxx> |
Date: | Mon, 15 Mar 2004 20:13:16 -0800 (PST) |
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
Description: Binary data