Glitch in sys_chroot() (fwd)

Jim Nance (jlnance@avanticorp.com)
Fri, 15 Nov 1996 03:59:48 -0500 (EST)


Forwarded message:
>
> sys_chroot() doesn't change directory after the chroot has happened.
>

Its not supposed to (I have no idea why not). The man page for Linux
states this, but to convince you this is the standard behavior for
Unix, here is the Digital Unix man page:

The effective root directory is the starting point when searching for a
file's pathname that begins with a / (slash). The current working directory
is not affected by the chroot() function.

And from Solaris:

chroot() and fchroot() cause a directory to become the root
directory, the starting point for path searches for path
names beginning with /. The user's working directory is
unaffected by the chroot() and fchroot() functions.

And from SunOS:

chroot() and fchroot() cause a directory to become the root
directory, the starting point for path names beginning with
`/'. The current working directory is unaffected by this
call.

Jim