Re: sys_chroot+sys_fchdir Fix

From: Chris Adams
Date: Wed Sep 26 2007 - 11:15:34 EST

Once upon a time, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> said:
>Well if citing standards documents at people is rudeness so be it.

I hate to get involved in this, but actually chroot() is no longer part
of SuS as of version 3.

For other Unix versions, both Tru64 (5.1B) and Solaris (9) chroot(2) man
pages also say the working directory is unaffected by chroot(). The
Solaris man page explicitly mentions using fchdir() to reset the root to
a previously opened directory however.

On Tru64 and Solaris, the chroot command does call chdir() after
chroot(), but that is a userspace thing.
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