[PATCH] split chroot(9) into kern_chroot() and chroot()

Matthew Dillon dillon at apollo.backplane.com
Tue Mar 16 08:49:08 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.
:--0-330776147-1079410396=:53456

    This is really nice code, Paul, I'll do some testing and commit it!

						-Matt






More information about the Submit mailing list