From: Nick Craig-Wood (ncw_at_axis.demon.co.uk)
Date: Thu 24 Jan 2002 - 14:59:38 GMT
On Thu, Jan 24, 2002 at 01:10:04PM +0100, Martin Josefsson wrote:
> Disallowing chroot alltogether if run in an chroot or limiting it like
> FreeBSD does is probably a good idea.
>
> http://www.FreeBSD.org/cgi/man.cgi?query=chroot&sektion=2&apropos=0&manpath=FreeBSD+4.0-RELEASE
That is nice - configurable too!
...
A simple fix might be in sys_chroot, if root != "/" then cd / after
doing the chroot. This introduces very mild POSIX breakage (not many
programs do a chroot in a chroot) and plugs this hole.
-- Nick Craig-Wood ncw_at_axis.demon.co.uk