Olivier Galibert wrote:
chroot does not allow you to walk out if you're in.
You're mistaken. Or more properly, further use of chroot lets you walk out. This really has been said before, and before, and before.
chroot("subtree"); // enter chroot chdir("/"); // now at subtree chroot("/tmp"); // now outside of chrootBSD redefined chroot so that the working directory is set to the new root on subsequent uses of chroot; that's how they solved the bug.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: Chroot bug
- From: Olivier Galibert <galibert@pobox.com>
- Re: Chroot bug
- From: "linux-os \(Dick Johnson\)" <linux-os@analogic.com>
- Re: Chroot bug
- References:
- Re: sys_chroot+sys_fchdir Fix
- From: "Serge E. Hallyn" <serge@hallyn.com>
- Re: sys_chroot+sys_fchdir Fix
- From: David Newall <david@davidnewall.com>
- Chroot bug (was: sys_chroot+sys_fchdir Fix)
- From: David Newall <david@davidnewall.com>
- Re: Chroot bug (was: sys_chroot+sys_fchdir Fix)
- From: Alan Cox <alan@lxorguk.ukuu.org.uk>
- Re: Chroot bug
- From: David Newall <david@davidnewall.com>
- Re: Chroot bug
- From: Alan Cox <alan@lxorguk.ukuu.org.uk>
- Re: Chroot bug
- From: David Newall <david@davidnewall.com>
- Re: Chroot bug
- From: Adrian Bunk <bunk@kernel.org>
- Re: Chroot bug
- From: Kyle Moffett <mrmacman_g4@mac.com>
- Re: Chroot bug
- From: David Newall <david@davidnewall.com>
- Re: Chroot bug
- From: Olivier Galibert <galibert@pobox.com>
- Re: sys_chroot+sys_fchdir Fix
- Prev by Date: Re: NMI error and Intel S5000PSL Motherboards
- Next by Date: [patch/backport] CFS scheduler, -v22, for v2.6.23-rc8, v2.6.22.8, v2.6.21.7, v2.6.20.20
- Previous by thread: Re: Chroot bug
- Next by thread: Re: Chroot bug
- Index(es):
![]() |