Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chroot(2) — svr4 — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chdir(2)



CHROOT(2-SVR4)      RISC/os Reference Manual       CHROOT(2-SVR4)



NAME
     chroot - change root directory

SYNOPSIS
     #include <unistd.h>

     int chroot(const char *path);

DESCRIPTION
     path points to a path name naming a directory.  chroot
     causes the named 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 system call.

     The effective user ID of the process must be super-user to
     change the root directory.

     The ..  entry in the root directory is interpreted to mean
     the root directory itself.  Thus, ..  cannot be used to
     access files outside the subtree rooted at the root direc-
     tory.

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

     ELOOP          Too many symbolic links were encountered in
                    translating path.

     ENAMETOOLONG   The length of the path argument exceeds
                    {PATH_MAX}, or the length of a path component
                    exceeds {NAME_MAX} while _POSIX_NO_TRUNC is
                    in effect.

     EFAULT         path points outside the allocated address
                    space of the process.

     EINTR          A signal was caught during the chroot system
                    call.

     EMULTIHOP      Components of path require hopping to multi-
                    ple remote machines and file system type does
                    not allow it.

     ENOLINK        path points to a remote machine and the link
                    to that machine is no longer active.

     ENOTDIR        Any component of the path name is not a
                    directory.

     ENOENT         The named directory does not exist or is a
                    null pathname.



                        Printed 11/19/92                   Page 1





CHROOT(2-SVR4)      RISC/os Reference Manual       CHROOT(2-SVR4)



     EPERM          The effective user ID is not superuser.

SEE ALSO
     chdir(2).

DIAGNOSTICS
     Upon successful completion, a value of 0 is returned.  Oth-
     erwise, a value of -1 is returned and errno is set to indi-
     cate the error.














































 Page 2                 Printed 11/19/92



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