Re: [patch 2/3] lsm: add bsdjail module

Serge E. Hallyn
2004-10-10T11:32:28Z

> Your filesystem handling code is completely superflous (and buggy). Please
> remove all the code dealing with chroot-lookalikes. In your userland script
> you simpl have to clone(.., CLONE_NEWNS) to detach your namespace from your
> parent, then you can lazly unmount all filesystems and setup your new namespace
> before starting the jail. The added advantage is that you don't need any
> cludges to keep the user from exiting the chroot.

I definately would prefer to use namespaces. I had originally wanted to
do a copy_namespace() in the module. That function is not exported,
though. Is doing that in user-space really the right way to do it?

thanks,
-serge