History log of /freebsd-9.3-release/lib/libc/sys/jail.2
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 235839 23-May-2012 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.


# 231896 18-Feb-2012 jamie

MFC r231236: Acknowledge that jail_attach and jail_remove can return EPERM.


# 225736 22-Sep-2011 kensmith

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

Approved by: re (implicit)


# 210772 02-Aug-2010 joel

Spelling fixes.


# 194762 23-Jun-2009 jamie

Add a limit for child jails via the "children.cur" and "children.max"
parameters. This replaces the simple "allow.jails" permission.

Approved by: bz (mentor)


# 192895 27-May-2009 jamie

Add hierarchical jails. A jail may further virtualize its environment
by creating a child jail, which is visible to that jail and to any
parent jails. Child jails may be restricted more than their parents,
but never less. Jail names reflect this hierarchy, being MIB-style
dot-separated strings.

Every thread now points to a jail, the default being prison0, which
contains information about the physical system. Prison0's root
directory is the same as rootvnode; its hostname is the same as the
global hostname, and its securelevel replaces the global securelevel.
Note that the variable "securelevel" has actually gone away, which
should not cause any problems for code that properly uses
securelevel_gt() and securelevel_ge().

Some jail-related permissions that were kept in global variables and
set via sysctls are now per-jail settings. The sysctls still exist for
backward compatibility, used only by the now-deprecated jail(2) system
call.

Approved by: bz (mentor)


# 191673 29-Apr-2009 jamie

Introduce the extensible jail framework, using the same "name=value"
interface as nmount(2). Three new system calls are added:
* jail_set, to create jails and change the parameters of existing jails.
This replaces jail(2).
* jail_get, to read the parameters of existing jails. This replaces the
security.jail.list sysctl.
* jail_remove to kill off a jail's processes and remove the jail.
Most jail parameters may now be changed after creation, and jails may be
set to exist without any attached processes. The current jail(2) system
call still exists, though it is now a stub to jail_set(2).

Approved by: bz (mentor)


# 191668 29-Apr-2009 jamie

With the permission of phk@ change the license on remaining jail code
to a 2 clause BSD license.

Approved by: phk
Approved by: bz (mentor)


# 186834 06-Jan-2009 bz

Document the special loopback address behaviour of jails.

PR: kern/103464
Submitted by: brueffer (correct markup)
Reviewed by: brueffer
MFC after: 2 weeks


# 185435 29-Nov-2008 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


# 181265 03-Aug-2008 trhodes

Add EAGAIN to the ERRORS list, as found in kern_jail.c.

PR: 125253
Submitted by: Mateusz Guzik <mjguzik@gmail.com> (original version)


# 141580 09-Feb-2005 ru

Fixed the misplaced $FreeBSD$.


# 130865 21-Jun-2004 mpp

Spelling fixes.


# 122504 11-Nov-2003 kensmith

- Markup fix-ups (add .Dq, and some hard line breaks at the end
of sentences).

Approved by: blackend (mentor)


# 122503 11-Nov-2003 kensmith

- Add a note about how jail(2) effects the securelevel.

Reviewed by: rwatson
Approved by: blackend (mentor)


# 115225 22-May-2003 ru

Assorted mdoc(7) fixes.

Approved by: re (blanket)


# 113275 09-Apr-2003 mike

o In struct prison, add an allprison linked list of prisons (protected
by allprison_mtx), a unique prison/jail identifier field, two path
fields (pr_path for reporting and pr_root vnode instance) to store
the chroot() point of each jail.
o Add jail_attach(2) to allow a process to bind to an existing jail.
o Add change_root() to perform the chroot operation on a specified
vnode.
o Generalize change_dir() to accept a vnode, and move namei() calls
to callers of change_dir().
o Add a new sysctl (security.jail.list) which is a group of
struct xprison instances that represent a snapshot of active jails.

Reviewed by: rwatson, tjr


# 108028 18-Dec-2002 ru

mdoc(7) police: Tidy up the syscall language.

Stop calling system calls "function calls".

Use "The .Fn system call" a-la "The .Nm utility".

When referring to a non-BSD implementation in
the HISTORY section, call syscall a function,
to be safe.


# 97295 26-May-2002 dd

Remove extra word.

Submitted by: Andre Guibert de Bruet <andy@siliconlandmark.com>


# 84306 01-Oct-2001 ru

mdoc(7) police: Use the new .In macro for #include statements.


# 82880 03-Sep-2001 dd

Don't capitalize jail(2) in the middle of a sentence.

PR: 25876
Submitted by: Koizumi Satoru <koizumi@cms.phys.s.u-tokyo.ac.jp>


# 82407 27-Aug-2001 dd

There shuldn't be whitespace before a question mark.


# 79754 15-Jul-2001 dd

Remove whitespace at EOL.


# 79531 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


# 75670 18-Apr-2001 ru

mdoc(7) police: normalize .Nd.


# 70481 29-Dec-2000 ru

Prepare for mdoc(7)NG.


# 70015 14-Dec-2000 ru

mdoc(7) police: removed history info from the .Os FreeBSD call.


# 59954 04-May-2000 phantom

Use `Er' variable to define first column width in ERRORS section. It was
initially suggested by mdoc(7) style, but was broken over the years


# 59460 21-Apr-2000 phantom

Introduce ".Lb" macro to libc manpages.

More libraries manpages updates following.


# 54958 21-Dec-1999 asmodai

Fix a typo which I cannot believe I missed after rereading this text
about 6-7 times prior to commit.

Reported by: sheldonh


# 54953 21-Dec-1999 asmodai

Properly manify this manpage.
Fix some spelling mistakes and typo's inspired by Nicholas' initial
PR submission.

PR: docs/15597
Submitted by: Nicholas Esborn <nick@flatlan.net>


# 51398 19-Sep-1999 phk

Add a version number field to the jail(2) argument so that future changes
can be handled intelligently.


# 50944 05-Sep-1999 phantom

mdoc(7) style fix: FreeBSD -> .Fx

Reviewed by: mpp


# 50476 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 49828 15-Aug-1999 mpp

Various man page cleanup:

- Sort xrefs
- FreeBSD.ORG -> FreeBSD.org
- Be consistent with section names as outlines in mdoc(7)
- Other misc mdoc cleanup.

PR: doc/13144
Submitted by: Alexy M. Zelkin <phantom@cris.net>


# 48721 09-Jul-1999 phk

Clarify an explanation a little bit.


# 47990 17-Jun-1999 green

Minor English corrections were made; SEE ALSO was also fixed (no commas).


# 47249 16-May-1999 phk

$ brucify -deblunder


# 46155 28-Apr-1999 phk

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/