> Normal users cannot use chroot() themselves so they can't use chroot to
I think Bill is right, that this is to fix a method that non-root
processes can use to escape their chroot. The exploit, which is
documented in chroot(2)*, is to chdir("..") your way out. Who'd have
thought it? Only root can do that, but even that seems wrong. Chroot
should be chroot and that should be the end of it.
It looks to me like Miloslav has found a bug, although I suspect there's
a simpler solution because non-root is already prevented from escaping
this way.
David
* In particular, the superuser can escape from a ‘chroot jail’ by doing
‘mkdir foo; chroot foo; cd ..’.
-