diff options
author | delphij <delphij@FreeBSD.org> | 2012-01-04 02:04:20 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2012-01-04 02:04:20 +0000 |
commit | 73078d5a8b3e61b2d619665a74f52c7ad74d9797 (patch) | |
tree | a96c742e72cd6f51f9511728cec573f0546387e7 /lib | |
parent | caa4548474a54b104b7a14a1625ef6c39b848dd3 (diff) | |
download | FreeBSD-src-73078d5a8b3e61b2d619665a74f52c7ad74d9797.zip FreeBSD-src-73078d5a8b3e61b2d619665a74f52c7ad74d9797.tar.gz |
Document the fact that chroot(2) is no longer part of POSIX since SUSv3
and add a SECURITY CONSIDERATIONS section for recommended practices.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/sys/chroot.2 | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/libc/sys/chroot.2 b/lib/libc/sys/chroot.2 index ecf2eb5..060d064 100644 --- a/lib/libc/sys/chroot.2 +++ b/lib/libc/sys/chroot.2 @@ -28,7 +28,7 @@ .\" @(#)chroot.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd January 3, 2012 .Dt CHROOT 2 .Os .Sh NAME @@ -134,9 +134,27 @@ The .Fn chroot system call appeared in .Bx 4.2 . +It was marked as +.Dq legacy +in +.St -susv2 , +and was removed in subsequent standards. .Sh BUGS If the process is able to change its working directory to the target directory, but another access control check fails (such as a check for open directories, or a MAC check), it is possible that this system call may return an error, with the working directory of the process left changed. +.Sh SECURITY CONSIDERATIONS +The system have many hardcoded paths to files where it may load after +the process starts. +It is generally recommended to drop privileges immediately after a +successful +.Nm +call, +and restrict write access to a limited subtree of the +.Nm +root, +for instance, +setup the sandbox so that the sandboxed user will have no write +access to any well-known system directories. |