This is the mail archive of the
cygwin-patches@sources.redhat.com
mailing list for the Cygwin project.
Re: chroot("/") can't work.
Kazuhiro Fujieda wrote:
> The current implementation of chroot sets '/' as the root dir
> against chroot("/"). It causes `//usr' by `/usr'. It must set an
> empty string as the root dir in the same way as the previous
> implementation.
Hmmm. I think you're right that the current behaviour is not
really ok but the old behaviour is wrong IMO.
If it's possible to set root to an empty string by calling
chroot("/") this could result in the ability to break out of the
chroot environment. This is not ok. But, hmm, this shouldn't
be possible...
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin@cygwin.com
Red Hat, Inc.
mailto:vinschen@redhat.com