Rev | Author | # | Line |
---|---|---|---|
1 | perry | 1 | CHROOT |
2 | !!!CHROOT | ||
2 | PerryLorier | 3 | TO |
1 | perry | 4 | SEE ALSO |
5 | ---- | ||
6 | !!NAME | ||
7 | |||
8 | chroot - change root directory | ||
9 | !!SYNOPSIS | ||
10 | |||
2 | PerryLorier | 11 | __#include <unistd.h>__ |
1 | perry | 12 | |
13 | |||
2 | PerryLorier | 14 | __int chroot(const char *__''path''__);__ |
1 | perry | 15 | !!DESCRIPTION |
16 | |||
2 | PerryLorier | 17 | __chroot__ changes the root directory to that specified in ''path''. This directory will be used for path names beginning with /. The root directory is inherited by all children of the current process. |
1 | perry | 18 | |
2 | PerryLorier | 19 | Only the super-user may change the root directory. |
1 | perry | 20 | |
2 | PerryLorier | 21 | Note that this call does not change the current working directory, so that `.' can be outside the tree rooted at `/'. In particular, the super-user can escape from a `chroot jail' by doing `mkdir foo; chroot foo; cd ..'. |
1 | perry | 22 | |
23 | !!RETURN VALUE | ||
24 | |||
2 | PerryLorier | 25 | On success, zero is returned. On error, -1 is returned, and ''errno'' is set appropriately. |
1 | perry | 26 | !!ERRORS |
27 | |||
2 | PerryLorier | 28 | Depending on the file system, other errors can be returned. The more general errors are listed below: |
1 | perry | 29 | |
2 | PerryLorier | 30 | ;[EPERM]: The effective UID is not zero. |
31 | ;[EFAULT]: ''path'' points outside your accessible address space. | ||
32 | ;[ENAMETOOLONG]: ''path'' is too long. | ||
33 | ;[ENOENT]: The file does not exist. | ||
34 | ;[ENOMEM]: Insufficient kernel memory was available. | ||
35 | ;[ENOTDIR]: A component of ''path'' is not a directory. | ||
36 | ;[EACCES]: Search permission is denied on a component of the path prefix. | ||
37 | ;[ELOOP]: Too many symbolic links were encountered in resolving ''path''. | ||
38 | ;[EIO]: An I/O error occurred. | ||
1 | perry | 39 | |
40 | !!CONFORMING TO | ||
41 | |||
2 | PerryLorier | 42 | SVr4, SVID, 4.4BSD, X/OPEN. This function is not part of POSIX.1. SVr4 documents additional [EINTR], [ENOLINK] and [EMULTIHOP] error conditions. X/OPEN does not document [EIO], [ENOMEM] or [EFAULT] error conditions. This interface is marked as legacy by X/OPEN. |
1 | perry | 43 | !!SEE ALSO |
44 | |||
45 | chdir(2) |
lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 6 times)