Re: [PATCH 0/3] Patches to enable chroot for all users

From: Rob Landley
Date: Wed Mar 20 2013 - 11:16:13 EST

On 03/20/2013 07:53:42 AM, Tal Tchwella wrote:
I want to suggest adding chroot capability to all users.

I note that chroot doesn't quite do what most people think it does:

I've had a todo item forever to modify chroot to actually change the process-local mount tree, creating a bind mount if necessary for the new directory, reparenting the mount tree to that bind mount, and making sure that reference counting can free unused mounts that this would discard. (Except rootfs always needs a nonzero reference count.)

The problem isn't adding security checks, the problem is that having a "/" symlink point somewhere _other_ than the actual top of the process-local mount tree is obsolete now that there isn't a single global mount tree for all processes. (Yes, this would mean it might need to create a new namespace.)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at