diff options
author | 1996-09-24 02:38:30 +0000 | |
---|---|---|
committer | 1996-09-24 02:38:30 +0000 | |
commit | 060a3d582d1fb471cf698664b4e9d6fb44dbbc91 (patch) | |
tree | 1546e8f56df4cc9b8b7425b2e3bf2b77d57846f6 /lib/libc/sys/chroot.2 | |
parent | Minor warning about unterminated constant fixed (diff) | |
download | wireguard-openbsd-060a3d582d1fb471cf698664b4e9d6fb44dbbc91.tar.xz wireguard-openbsd-060a3d582d1fb471cf698664b4e9d6fb44dbbc91.zip |
unescapeable chroot; thanks to nirva and asriel for helping
Diffstat (limited to 'lib/libc/sys/chroot.2')
-rw-r--r-- | lib/libc/sys/chroot.2 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libc/sys/chroot.2 b/lib/libc/sys/chroot.2 index 74c64ee4b49..0b66b680706 100644 --- a/lib/libc/sys/chroot.2 +++ b/lib/libc/sys/chroot.2 @@ -57,10 +57,16 @@ beginning with In order for a directory to become the root directory a process must have execute (search) access for that directory. .Pp -It should be noted that +If the program is not currently running with an altered root directory, +it should be noted that .Fn chroot has no effect on the process's current directory. .Pp +If the program is already running with an altered root directory, the +process's current directory is changed to the same new root directory. +This prevents the current directory from being further up the directory +tree than the altered root directory. +.Pp This call is restricted to the super-user. .Sh RETURN VALUES Upon successful completion, a value of 0 is returned. Otherwise, |