aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/jail/jail.8
blob: 6172af7e54346ac1a07f1c0639582e0458acde5b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.\"
.\"----------------------------------------------------------------------------
.\""THE BEER-WARE LICENSE" (Revision 42):
.\"<phk@FreeBSD.ORG> wrote this file.  As long as you retain this notice you
.\"can do whatever you want with this stuff. If we meet some day, and you think
.\"this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
.\"----------------------------------------------------------------------------
.\"
.\"$FreeBSD$
.\"
.\"
.Dd April 28, 1999
.Dt JAIL 8
.Os FreeBSD 4.0
.Sh NAME
.Nm jail
.Nd imprison process and its descendants
.Sh SYNOPSIS
.Nm jail
.Ar path
.Ar hostname
.Ar ip-number
.Ar command
.Ar ...
.Sh DESCRIPTION
The
.Nm
command imprisons a process and all future decendants.
.Pp
Please see the
.Xr jail 2
man page for further details.
.Sh EXAMPLES
This shows how to setup a jail directory tree:
.Bd -literal 
D=/here/is/the/jail
cd /usr/src
make hierarchy DESTDIR=$D
make obj
make all
make install DESTDIR=$D
cd etc
make distribution DESTDIR=$D
cd $D/dev
sh MAKEDEV jail
cd $D
ln -sf dev/null kernel
echo "proc $D/proc procfs rw 0 0" >> /etc/fstab
.Ed
.Sh SEE ALSO
.Xr chroot 2 ,
.Xr jail 2
.Sh HISTORY
The
.Fn jail
function call appeared in
.Fx 4.0 .
.Pp
The jail feature was written by Poul-Henning Kamp for
R&D Associates
.Dq Li http://www.rndassociates.com/
who contributed it to FreeBSD.