Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chroot(S) — Xenix 2.3.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chdir(S)

chroot(C)



     CHROOT(S)                XENIX System V                 CHROOT(S)



     Name
          chroot - Changes the root directory.

     Syntax
          int chroot (path)
          char *path;

     Description
          path points to a pathname naming a directory.  chroot causes
          the named directory to become the root directory, the
          starting point for path searches for pathnames beginning
          with /.  The user's working directory is unaffected by the
          chroot system call.

          To change the root directory, the effective user ID of the
          process must be super-user.

          The ``..'' entry in the root directory is interpreted to
          mean the root directory itself.  Thus, ``..'' cannot be used
          to access files outside the root directory.

          chroot will fail and the root directory will remain
          unchanged if one or more of the following are true:

               Any component of the pathname is not a directory.
               [ENOTDIR]

               The named directory does not exist.  [ENOENT]

               The effective user ID is not super-user.  [EPERM]

               path points outside the process' allocated address
               space.  [EFAULT]

     Return Value
          Upon successful completion, a value of 0 is returned.
          Otherwise, a value of -1 is returned and errno is set to
          indicate the error.

     See Also
          chdir(S), chroot(C)














     Page 1                                           (printed 8/7/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026