[lkml]   [1996]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Glitch in sys_chroot()

    Elliot Lee <> writes:

    > > That's because the bug is in chroot(8), not chroot(2). chroot(2) is
    > > supposed to change only the root directory; Linux's behavior is
    > > correct.
    > I don't think the bug is in chroot(8) necessarily (although
    > POSIX tests don't include chroot AFAIK, the man pages on other systems
    > don't specify that the PWD isn't changed (although they DO specify that
    > /.. should point to /., a behaviour which Linux follows) therefore there
    > is no real standard as to determine what makes it incorrect/correct.

    Which other systems' manpages did you read? I found a few which did
    not specify what the new cwd should be, but also several which said
    that Linux's behavior was correct. For instance:

    SunOS 4.1.1: "The current working directory is unaffected by this call."

    SunOS 5.4 / Solaris 2.4: "The user's working directory is unaffected
    by the chroot() and fchroot() functions."

    IRIX 5.3: "The user's working directory is unaffected by the chroot
    system call."

    NetBSD 1.2: "It should be noted that chroot() has no effect on the
    process's current directory."

    Any questions?

    Aaron M. Ucko ( | For Geek Code, PGP public key, and other info,
    finger | "Kids! Bringing about Armageddon can be dangerous.
    Do not attempt it in your home." -- T. Pratchett & N. Gaiman, _Good Omens_

     \ /
      Last update: 2005-03-22 13:38    [W:0.017 / U:14.996 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site