head	1.17;
access;
symbols
	RELENG_8_4:1.16.0.2
	RELENG_9_1_0_RELEASE:1.14.2.2.2.2
	RELENG_9_1:1.14.2.2.0.2
	RELENG_9_1_BP:1.14.2.2
	RELENG_8_3_0_RELEASE:1.12.2.1.8.1
	RELENG_8_3:1.12.2.1.0.8
	RELENG_8_3_BP:1.12.2.1
	RELENG_9_0_0_RELEASE:1.14.2.1.2.1
	RELENG_9_0:1.14.2.1.0.2
	RELENG_9_0_BP:1.14.2.1
	RELENG_9:1.14.0.2
	RELENG_9_BP:1.14
	RELENG_7_4_0_RELEASE:1.10.10.1.6.1
	RELENG_8_2_0_RELEASE:1.12.2.1.6.1
	RELENG_7_4:1.10.10.1.0.6
	RELENG_7_4_BP:1.10.10.1
	RELENG_8_2:1.12.2.1.0.6
	RELENG_8_2_BP:1.12.2.1
	RELENG_8_1_0_RELEASE:1.12.2.1.4.1
	RELENG_8_1:1.12.2.1.0.4
	RELENG_8_1_BP:1.12.2.1
	RELENG_7_3_0_RELEASE:1.10.10.1.4.1
	RELENG_7_3:1.10.10.1.0.4
	RELENG_7_3_BP:1.10.10.1
	RELENG_8_0_0_RELEASE:1.12.2.1.2.1
	RELENG_8_0:1.12.2.1.0.2
	RELENG_8_0_BP:1.12.2.1
	RELENG_8:1.12.0.2
	RELENG_8_BP:1.12
	RELENG_7_2_0_RELEASE:1.10.10.1.2.1
	RELENG_7_2:1.10.10.1.0.2
	RELENG_7_2_BP:1.10.10.1
	RELENG_7_1_0_RELEASE:1.10.18.1
	RELENG_6_4_0_RELEASE:1.10.16.1
	RELENG_7_1:1.10.0.18
	RELENG_7_1_BP:1.10
	RELENG_6_4:1.10.0.16
	RELENG_6_4_BP:1.10
	RELENG_7_0_0_RELEASE:1.10
	RELENG_6_3_0_RELEASE:1.10
	RELENG_7_0:1.10.0.14
	RELENG_7_0_BP:1.10
	RELENG_6_3:1.10.0.12
	RELENG_6_3_BP:1.10
	RELENG_7:1.10.0.10
	RELENG_7_BP:1.10
	RELENG_6_2_0_RELEASE:1.10
	RELENG_6_2:1.10.0.8
	RELENG_6_2_BP:1.10
	RELENG_5_5_0_RELEASE:1.9
	RELENG_5_5:1.9.0.12
	RELENG_5_5_BP:1.9
	RELENG_6_1_0_RELEASE:1.10
	RELENG_6_1:1.10.0.6
	RELENG_6_1_BP:1.10
	RELENG_6_0_0_RELEASE:1.10
	RELENG_6_0:1.10.0.4
	RELENG_6_0_BP:1.10
	RELENG_6:1.10.0.2
	RELENG_6_BP:1.10
	RELENG_5_4_0_RELEASE:1.9
	RELENG_5_4:1.9.0.10
	RELENG_5_4_BP:1.9
	RELENG_4_11_0_RELEASE:1.4.2.2
	RELENG_4_11:1.4.2.2.0.6
	RELENG_4_11_BP:1.4.2.2
	RELENG_5_3_0_RELEASE:1.9
	RELENG_5_3:1.9.0.8
	RELENG_5_3_BP:1.9
	RELENG_5:1.9.0.6
	RELENG_5_BP:1.9
	RELENG_4_10_0_RELEASE:1.4.2.2
	RELENG_4_10:1.4.2.2.0.4
	RELENG_4_10_BP:1.4.2.2
	RELENG_5_2_1_RELEASE:1.9
	RELENG_5_2_0_RELEASE:1.9
	RELENG_5_2:1.9.0.4
	RELENG_5_2_BP:1.9
	RELENG_4_9_0_RELEASE:1.4.2.2
	RELENG_4_9:1.4.2.2.0.2
	RELENG_4_9_BP:1.4.2.2
	RELENG_5_1_0_RELEASE:1.9
	RELENG_5_1:1.9.0.2
	RELENG_5_1_BP:1.9
	RELENG_4_8_0_RELEASE:1.4.2.1
	RELENG_4_8:1.4.2.1.0.10
	RELENG_4_8_BP:1.4.2.1
	RELENG_5_0_0_RELEASE:1.8
	RELENG_5_0:1.8.0.2
	RELENG_5_0_BP:1.8
	RELENG_4_7_0_RELEASE:1.4.2.1
	RELENG_4_7:1.4.2.1.0.8
	RELENG_4_7_BP:1.4.2.1
	RELENG_4_6_2_RELEASE:1.4.2.1
	RELENG_4_6_1_RELEASE:1.4.2.1
	RELENG_4_6_0_RELEASE:1.4.2.1
	RELENG_4_6:1.4.2.1.0.6
	RELENG_4_6_BP:1.4.2.1
	RELENG_4_5_0_RELEASE:1.4.2.1
	RELENG_4_5:1.4.2.1.0.4
	RELENG_4_5_BP:1.4.2.1
	RELENG_4_4_0_RELEASE:1.4.2.1
	RELENG_4_4:1.4.2.1.0.2
	RELENG_4_4_BP:1.4.2.1
	RELENG_4_3_0_RELEASE:1.4
	RELENG_4_3:1.4.0.4
	RELENG_4_3_BP:1.4
	RELENG_4_2_0_RELEASE:1.4
	RELENG_4_1_1_RELEASE:1.4
	PRE_SMPNG:1.4
	RELENG_4_1_0_RELEASE:1.4
	RELENG_4_0_0_RELEASE:1.4
	RELENG_4:1.4.0.2
	RELENG_4_BP:1.4;
locks; strict;
comment	@# @;


1.17
date	2013.04.20.00.35.21;	author svnexp;	state Exp;
branches;
next	1.16;

1.16
date	2012.11.17.01.54.45;	author svnexp;	state Exp;
branches
	1.16.2.1;
next	1.15;

1.15
date	2012.04.26.17.36.05;	author jamie;	state Exp;
branches;
next	1.14;

1.14
date	2011.05.29.21.03.40;	author bz;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	2010.01.02.11.07.44;	author ed;	state Exp;
branches;
next	1.12;

1.12
date	2009.06.24.18.18.35;	author jamie;	state Exp;
branches
	1.12.2.1;
next	1.11;

1.11
date	2008.11.29.14.32.14;	author bz;	state Exp;
branches;
next	1.10;

1.10
date	2004.11.17.10.01.48;	author delphij;	state Exp;
branches
	1.10.2.1
	1.10.10.1
	1.10.16.1
	1.10.18.1;
next	1.9;

1.9
date	2003.03.27.12.16.58;	author maxim;	state Exp;
branches;
next	1.8;

1.8
date	2001.07.20.06.19.52;	author obrien;	state Exp;
branches;
next	1.7;

1.7
date	2001.06.30.05.39.34;	author dd;	state Exp;
branches;
next	1.6;

1.6
date	2001.03.26.14.40.27;	author ru;	state Exp;
branches;
next	1.5;

1.5
date	2001.03.20.18.16.37;	author ru;	state Exp;
branches;
next	1.4;

1.4
date	99.08.28.01.16.37;	author peter;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	99.05.05.19.23.44;	author phk;	state Exp;
branches;
next	1.2;

1.2
date	99.05.04.18.20.52;	author phk;	state Exp;
branches;
next	1.1;

1.1
date	99.04.28.11.38.24;	author phk;	state Exp;
branches;
next	;

1.16.2.1
date	2012.11.17.01.54.45;	author svnexp;	state dead;
branches;
next	1.16.2.2;

1.16.2.2
date	2013.03.28.13.06.17;	author svnexp;	state Exp;
branches;
next	;

1.14.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.14.2.1.2.1;
next	1.14.2.2;

1.14.2.2
date	2012.05.23.15.29.34;	author jamie;	state Exp;
branches
	1.14.2.2.2.1;
next	1.14.2.3;

1.14.2.3
date	2012.11.17.11.37.44;	author svnexp;	state Exp;
branches;
next	;

1.14.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.14.2.1.2.2;

1.14.2.1.2.2
date	2012.11.17.08.37.41;	author svnexp;	state Exp;
branches;
next	;

1.14.2.2.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.14.2.2.2.2;

1.14.2.2.2.2
date	2012.11.17.08.48.32;	author svnexp;	state Exp;
branches;
next	;

1.12.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.12.2.1.2.1
	1.12.2.1.4.1
	1.12.2.1.6.1
	1.12.2.1.8.1;
next	1.12.2.2;

1.12.2.2
date	2012.11.17.10.37.22;	author svnexp;	state Exp;
branches;
next	;

1.12.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.12.2.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.12.2.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.12.2.1.8.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.12.2.1.8.2;

1.12.2.1.8.2
date	2012.11.17.08.25.55;	author svnexp;	state Exp;
branches;
next	;

1.10.2.1
date	2012.11.17.07.46.20;	author svnexp;	state Exp;
branches;
next	;

1.10.10.1
date	2009.02.07.13.19.08;	author bz;	state Exp;
branches
	1.10.10.1.2.1
	1.10.10.1.4.1
	1.10.10.1.6.1;
next	1.10.10.2;

1.10.10.2
date	2012.11.17.08.09.02;	author svnexp;	state Exp;
branches;
next	;

1.10.10.1.2.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.10.10.1.4.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.10.10.1.6.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.10.10.1.6.2;

1.10.10.1.6.2
date	2012.11.17.08.17.47;	author svnexp;	state Exp;
branches;
next	;

1.10.16.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.10.18.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.4.2.1
date	2001.04.25.12.09.43;	author ru;	state Exp;
branches;
next	1.4.2.2;

1.4.2.2
date	2003.05.08.13.04.24;	author maxim;	state Exp;
branches;
next	1.4.2.3;

1.4.2.3
date	2012.11.17.07.28.16;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.17
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249657
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@# $FreeBSD: head/usr.sbin/jail/Makefile 249657 2013-04-19 19:45:00Z ed $

.include <bsd.own.mk>

PROG=	jail
MAN=	jail.8 jail.conf.5
SRCS=	jail.c command.c config.c state.c jailp.h jaillex.l jailparse.y y.tab.h

DPADD=	${LIBJAIL} ${LIBKVM} ${LIBUTIL} ${LIBL}
LDADD=	-ljail -lkvm -lutil -ll

NO_WMISSING_VARIABLE_DECLARATIONS=

YFLAGS+=-v
CFLAGS+=-I. -I${.CURDIR}

.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DINET6
.endif
.if ${MK_INET_SUPPORT} != "no"
CFLAGS+= -DINET
.endif

CLEANFILES= y.output

.include <bsd.prog.mk>
@


1.16
log
@Switching exporter and resync
@
text
@d1 1
a1 1
# $FreeBSD: head/usr.sbin/jail/Makefile 234712 2012-04-26 17:36:05Z jamie $
d12 2
@


1.16.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:06:17 +0000
@
text
@d1 24
@


1.16.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 16
# $FreeBSD: releng/8.4/usr.sbin/jail/Makefile 194869 2009-06-24 18:18:35Z jamie $

.include <bsd.own.mk>

PROG=	jail
MAN=	jail.8
DPADD=	${LIBJAIL} ${LIBUTIL}
LDADD=	-ljail -lutil

WARNS?=	6

.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DINET6
.endif

.include <bsd.prog.mk>
@


1.15
log
@SVN rev 234712 on 2012-04-26 17:36:05Z by jamie

A new jail(8) with a configuration file, ultimately to replace the work
currently done by /etc/rc.d/jail.

MFC after:	3 months
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.14
log
@SVN rev 222465 on 2011-05-29 21:03:40Z by bz

Check for IPv4 or IPv6 to be available by the kernel to not
provoke errors trying to query options not available.
Make it possible to compile out INET or INET6 only parts.

Reviewed by:	jamie
Sponsored by:	The FreeBSD Foundation
Sponsored by:	iXsystems
MFC after:	10 days
@
text
@d6 8
a13 3
MAN=	jail.8
DPADD=	${LIBJAIL} ${LIBUTIL}
LDADD=	-ljail -lutil
d22 2
@


1.14.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.14.2.2
log
@SVN rev 235839 on 2012-05-23 15:29:34Z by jamie

MFC r234712, r234744, r234934, r234988, r235294, r235335,
and bits of r235337 and r235355:

 A new jail(8) with a configuration file, ultimately to replace the work
 currently done by /etc/rc.d/jail.
@
text
@d6 3
a8 8
MAN=	jail.8 jail.conf.5
SRCS=	jail.c command.c config.c state.c jailp.h jaillex.l jailparse.y y.tab.h

DPADD=	${LIBJAIL} ${LIBKVM} ${LIBUTIL} ${LIBL}
LDADD=	-ljail -lkvm -lutil -ll

YFLAGS+=-v
CFLAGS+=-I. -I${.CURDIR}
a16 2
CLEANFILES= y.output

@


1.14.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/usr.sbin/jail/Makefile 235839 2012-05-23 15:29:34Z jamie $
@


1.14.2.2.2.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.14.2.2.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/usr.sbin/jail/Makefile 235839 2012-05-23 15:29:34Z jamie $
@


1.14.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.14.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/usr.sbin/jail/Makefile 222465 2011-05-29 21:03:40Z bz $
@


1.13
log
@SVN rev 201390 on 2010-01-02 11:07:44Z by ed

The last big commit: let usr.sbin/ use WARNS=6 by default.
@
text
@d13 3
@


1.12
log
@SVN rev 194869 on 2009-06-24 18:18:35Z by jamie

Add libjail, a (somewhat) simpler interface to the jail_set and jail_get
system calls and the security.jail.param sysctls.

Approved by:	bz (mentor)
@
text
@a9 2
WARNS?=	6

@


1.12.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.12.2.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/usr.sbin/jail/Makefile 194869 2009-06-24 18:18:35Z jamie $
@


1.12.2.1.8.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.12.2.1.8.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/usr.sbin/jail/Makefile 194869 2009-06-24 18:18:35Z jamie $
@


1.12.2.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.12.2.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.12.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.11
log
@SVN rev 185435 on 2008-11-29 14:32:14Z by bz

MFp4:
  Bring in updated jail support from bz_jail branch.

This enhances the current jail implementation to permit multiple
addresses per jail. In addtion to IPv4, IPv6 is supported as well.
Due to updated checks it is even possible to have jails without
an IP address at all, which basically gives one a chroot with
restricted process view, no networking,..

SCTP support was updated and supports IPv6 in jails as well.

Cpuset support permits jails to be bound to specific processor
sets after creation.

Jails can have an unrestricted (no duplicate protection, etc.) name
in addition to the hostname. The jail name cannot be changed from
within a jail and is considered to be used for management purposes
or as audit-token in the future.

DDB 'show jails' command was added to aid debugging.

Proper compat support permits 32bit jail binaries to be used on 64bit
systems to manage jails. Also backward compatibility was preserved where
possible: for jail v1 syscalls, as well as with user space management
utilities.

Both jail as well as prison version were updated for the new features.
A gap was intentionally left as the intermediate versions had been
used by various patches floating around the last years.

Bump __FreeBSD_version for the afore mentioned and in kernel changes.

Special thanks to:
- Pawel Jakub Dawidek (pjd) for his multi-IPv4 patches
  and Olivier Houchard (cognet) for initial single-IPv6 patches.
- Jeff Roberson (jeff) and Randall Stewart (rrs) for their
  help, ideas and review on cpuset and SCTP support.
- Robert Watson (rwatson) for lots and lots of help, discussions,
  suggestions and review of most of the patch at various stages.
- John Baldwin (jhb) for his help.
- Simon L. Nielsen (simon) as early adopter testing changes
  on cluster machines as well as all the testers and people
  who provided feedback the last months on freebsd-jail and
  other channels.
- My employer, CK Software GmbH, for the support so I could work on this.

Reviewed by:	(see above)
MFC after:	3 months (this is just so that I get the mail)
X-MFC Before:   7.2-RELEASE if possible
@
text
@d7 2
a8 2
DPADD=	${LIBUTIL}
LDADD=	-lutil
@


1.10
log
@Initialize lcap and pwd to NULL.  This allows a WARNS=6 clean build,
hence bump it to 6.

Note that the last commit message was not quite accurate.  While the
assumption exists in the code, it's not possible to have an
uninitialized p there because if lflag is set when username is NULL
then execution would be terminated earlier.
@
text
@d3 2
d12 4
@


1.10.2.1
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/6/usr.sbin/jail/Makefile 137808 2004-11-17 10:01:48Z delphij $
@


1.10.10.1
log
@SVN rev 188281 on 2009-02-07 13:19:08Z by bz

MFC:
 r185435:
  This enhances the current jail implementation to permit multiple
  addresses per jail. In addtion to IPv4, IPv6 is supported as well.
  Due to updated checks it is even possible to have jails without
  an IP address at all, which basically gives one a chroot with
  restricted process view, no networking,..

  SCTP support was updated and supports IPv6 in jails as well.

  Cpuset support permits jails to be bound to specific processor
  sets after creation.

  Jails can have an unrestricted (no duplicate protection, etc.) name
  in addition to the hostname. The jail name cannot be changed from
  within a jail and is considered to be used for management purposes
  or as audit-token in the future.

  DDB 'show jails' command was added to aid debugging.

  Proper compat support permits 32bit jail binaries to be used on 64bit
  systems to manage jails. Also backward compatibility was preserved where
  possible: for jail v1 syscalls, as well as with user space management
  utilities.

  Both jail as well as prison version were updated for the new features.
  A gap was intentionally left as the intermediate versions had been
  used by various patches floating around the last years.

  Bump __FreeBSD_version for the afore mentioned and in kernel changes.

 r185441:
  Unbreak the no-networks (no INET/6) build.

 r185899:
  Correctly check the number of prison states to not access anything
  outside the prison_states array.
  When checking if there is a name configured for the prison, check the
  first character to not be '\0' instead of checking if the char array
  is present, which it always is. Note, that this is different for the
  *jailname in the syscall.

  Found with:	Coverity Prevent(tm)
  CID:		4156, 4155

 r186085:
  Make sure that the direct jls invocations prints something
  reasonable close to and in the same format as it had always.

 r186606:
  Make sure that unused j->ip[46] are cleared.

 r186834:
  Document the special loopback address behaviour of jails.

  PR:		kern/103464

 r186841:
  Put the devfs ruleset next to devfs enable, add a comment about
  the suggested ruleset[1].

  While here use an IP from the 'test-net' prefix for docs.

  PR:		kern/130102

 r187059:
  Add a short section talking about jails and file systems; mention the
  mountand jail-aware file systems as well as quota.

  PR:		kern/68192

 r187092:
  Sort .Xr.

 r187365:
  s,unmount 8,umount 8, it is unmount(2) which I did not mean.

 r187669:
  Update the description of the '-h' option wrt to primary addresses
  per address family and add a reference to the ip-addresses option.

 r187670:
  New sentence starts on a new line.
@
text
@a2 2
.include <bsd.own.mk>

a9 4
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DINET6
.endif

@


1.10.10.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/7/usr.sbin/jail/Makefile 188281 2009-02-07 13:19:08Z bz $
@


1.10.10.1.6.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.10.10.1.6.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/7.4/usr.sbin/jail/Makefile 188281 2009-02-07 13:19:08Z bz $
@


1.10.10.1.4.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.10.10.1.2.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.10.18.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.10.16.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.9
log
@o Add -u <username> flag to jail(8): set user context before exec.

PR:		bin/44320
Submitted by:	Mike Matsnev <mike@@po.cs.msu.su>
Reviewed by:	-current
MFC after:	6 weeks
@
text
@d8 1
a8 1
WARNS?=	2
@


1.8
log
@Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
@
text
@d1 1
a1 1
# $FreeBSD: src/usr.sbin/jail/Makefile,v 1.7 2001/06/30 05:39:34 dd Exp $
d5 2
@


1.7
log
@Set WARNS=2 on programs that compile cleanly with it; add $FreeBSD$
where necessary.

Submitted by:	Mike Barcroft <mike@@q9media.com>
@
text
@d1 1
a1 1
# $FreeBSD: src/usr.sbin/jail/Makefile,v 1.6 2001/03/26 14:40:27 ru Exp $
d4 2
a6 1
MAN=	jail.8
d8 1
a8 1
.include	<bsd.prog.mk>
@


1.6
log
@- Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
@
text
@d1 1
a1 1
# $FreeBSD: src/usr.sbin/jail/Makefile,v 1.5 2001/03/20 18:16:37 ru Exp $
d4 1
@


1.5
log
@Set the default manual section for usr.sbin/ to 8.
@
text
@d1 1
a1 1
# $FreeBSD: src/usr.sbin/jail/Makefile,v 1.4 1999/08/28 01:16:37 peter Exp $
d4 1
@


1.4
log
@$Id$ -> $FreeBSD$
@
text
@d1 1
a1 1
# $FreeBSD$
a3 1
MAN8=	jail.8
@


1.4.2.1
log
@MFC: MAN[1-9] -> MAN.
@
text
@d1 1
a1 1
# $FreeBSD: src/usr.sbin/jail/Makefile,v 1.4 1999/08/28 01:16:37 peter Exp $
d4 1
a4 1
MAN=	jail.8
@


1.4.2.2
log
@MFC:
rev. 1.7 jail.c

  o Add missing includes and sort includes.

rev. 1.9 Makefile
rev. 1.42 jail.8
rev. 1.9 - 1.11 jail.c

  o Add -u <username> flag to jail(8): set user context before exec.
@
text
@d1 1
a1 1
# $FreeBSD$
a4 2
DPADD=	${LIBUTIL}
LDADD=	-lutil
@


1.4.2.3
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/4/usr.sbin/jail/Makefile 114838 2003-05-08 13:04:24Z maxim $
@


1.3
log
@Various cosmetics.

Submitted by:	Rudolf Cejka <cejkar@@dcse.fee.vutbr.cz>
Reviewed by:	phk
@
text
@d1 1
a1 1
#	$Id$
@


1.2
log
@Fix various bogons.

Submitted by:	Rudolf Cejka <cejkar@@dcse.fee.vutbr.cz>
Reviewed by:	phk
@
text
@d1 1
a1 1
# $id$
@


1.1
log
@This Implements the mumbled about "Jail" feature.

This is a seriously beefed up chroot kind of thing.  The process
is jailed along the same lines as a chroot does it, but with
additional tough restrictions imposed on what the superuser can do.

For all I know, it is safe to hand over the root bit inside a
prison to the customer living in that prison, this is what
it was developed for in fact:  "real virtual servers".

Each prison has an ip number associated with it, which all IP
communications will be coerced to use and each prison has its own
hostname.

Needless to say, you need more RAM this way, but the advantage is
that each customer can run their own particular version of apache
and not stomp on the toes of their neighbors.

It generally does what one would expect, but setting up a jail
still takes a little knowledge.

A few notes:

   I have no scripts for setting up a jail, don't ask me for them.

   The IP number should be an alias on one of the interfaces.

   mount a /proc in each jail, it will make ps more useable.

   /proc/<pid>/status tells the hostname of the prison for
   jailed processes.

   Quotas are only sensible if you have a mountpoint per prison.

   There are no privisions for stopping resource-hogging.

   Some "#ifdef INET" and similar may be missing (send patches!)

If somebody wants to take it from here and develop it into
more of a "virtual machine" they should be most welcome!

Tools, comments, patches & documentation most welcome.

Have fun...

Sponsored by:   http://www.rndassociates.com/
Run for almost a year by:       http://www.servetheweb.com/
@
text
@d1 2
@

