Deleted Added
full compact
chroot.2 (108028) chroot.2 (108087)
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)chroot.2 8.1 (Berkeley) 6/4/93
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)chroot.2 8.1 (Berkeley) 6/4/93
33.\" $FreeBSD: head/lib/libc/sys/chroot.2 108028 2002-12-18 09:22:32Z ru $
33.\" $FreeBSD: head/lib/libc/sys/chroot.2 108087 2002-12-19 09:40:28Z ru $
34.\"
35.Dd June 4, 1993
36.Dt CHROOT 2
37.Os
38.Sh NAME
39.Nm chroot
40.Nd change root directory
41.Sh LIBRARY
42.Lb libc
43.Sh SYNOPSIS
44.In unistd.h
45.Ft int
46.Fn chroot "const char *dirname"
47.Sh DESCRIPTION
34.\"
35.Dd June 4, 1993
36.Dt CHROOT 2
37.Os
38.Sh NAME
39.Nm chroot
40.Nd change root directory
41.Sh LIBRARY
42.Lb libc
43.Sh SYNOPSIS
44.In unistd.h
45.Ft int
46.Fn chroot "const char *dirname"
47.Sh DESCRIPTION
48.Fa Dirname
48The
49.Fa dirname
50argument
49is the address of the pathname of a directory, terminated by an ASCII NUL.
50The
51.Fn chroot
52system call causes
53.Fa dirname
54to become the root directory,
55that is, the starting point for path searches of pathnames
56beginning with

--- 58 unchanged lines hidden (view full) ---

115or an entire path name exceeded 1023 characters.
116.It Bq Er ENOENT
117The named directory does not exist.
118.It Bq Er EACCES
119Search permission is denied for any component of the path name.
120.It Bq Er ELOOP
121Too many symbolic links were encountered in translating the pathname.
122.It Bq Er EFAULT
51is the address of the pathname of a directory, terminated by an ASCII NUL.
52The
53.Fn chroot
54system call causes
55.Fa dirname
56to become the root directory,
57that is, the starting point for path searches of pathnames
58beginning with

--- 58 unchanged lines hidden (view full) ---

117or an entire path name exceeded 1023 characters.
118.It Bq Er ENOENT
119The named directory does not exist.
120.It Bq Er EACCES
121Search permission is denied for any component of the path name.
122.It Bq Er ELOOP
123Too many symbolic links were encountered in translating the pathname.
124.It Bq Er EFAULT
125The
123.Fa dirname
126.Fa dirname
127argument
124points outside the process's allocated address space.
125.It Bq Er EIO
126An I/O error occurred while reading from or writing to the file system.
127.El
128.Sh SEE ALSO
129.Xr chdir 2 ,
130.Xr jail 2
131.Sh HISTORY
132The
133.Fn chroot
134system call appeared in
135.Bx 4.2 .
128points outside the process's allocated address space.
129.It Bq Er EIO
130An I/O error occurred while reading from or writing to the file system.
131.El
132.Sh SEE ALSO
133.Xr chdir 2 ,
134.Xr jail 2
135.Sh HISTORY
136The
137.Fn chroot
138system call appeared in
139.Bx 4.2 .