freebsd-skq/usr.sbin/jail/jail.8
1999-08-28 01:35:59 +00:00

63 lines
1.3 KiB
Groff

.\"
.\"----------------------------------------------------------------------------
.\""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.