diff options
author | jamie <jamie@FreeBSD.org> | 2009-05-27 14:11:23 +0000 |
---|---|---|
committer | jamie <jamie@FreeBSD.org> | 2009-05-27 14:11:23 +0000 |
commit | a013e0afcbb44052a86a7977277d669d8883b7e7 (patch) | |
tree | b7f782d79e61a1bd80655a068684cb0fd9f39922 /lib/libc | |
parent | 6e53147404a7f4fb4173694bc812d9d23efd9fef (diff) | |
download | FreeBSD-src-a013e0afcbb44052a86a7977277d669d8883b7e7.zip FreeBSD-src-a013e0afcbb44052a86a7977277d669d8883b7e7.tar.gz |
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)
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/jail.2 | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/lib/libc/sys/jail.2 b/lib/libc/sys/jail.2 index 726aa78..4b047bf 100644 --- a/lib/libc/sys/jail.2 +++ b/lib/libc/sys/jail.2 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 29, 2009 +.Dd May 27, 2009 .Dt JAIL 2 .Os .Sh NAME @@ -283,7 +283,7 @@ of the jail for the given address family. It is possible to identify a process as jailed by examining .Dq Li /proc/<pid>/status : it will show a field near the end of the line, either as -a single hyphen for a process at large, or the hostname currently +a single hyphen for a process at large, or the name currently set for the prison for jailed processes. .Sh ERRORS The @@ -292,7 +292,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EPERM -This process is not allowed to create a jail. +This process is not allowed to create a jail, either because it is not +the super-user, or because it is in a jail where the +.Va allow.jails +parameter is not set. .It Bq Er EFAULT .Fa jail points to an address outside the allocated address space of the process. @@ -308,7 +311,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EPERM -This process is not allowed to create a jail. +This process is not allowed to create a jail, either because it is not +the super-user, or because it is in a jail where the +.Va allow.jails +parameter is not set. .It Bq Er EPERM A jail parameter was set to a less restrictive value then the current environment. @@ -324,6 +330,11 @@ or parameter does not exist, and the .Dv JAIL_CREATE flag is not set. +.It Bq Er ENOENT +The jail referred to by a +.Va jid +is not accessible by the process, because the process is in a different +jail. .It Bq Er EEXIST The jail referred to by a .Va jid @@ -368,6 +379,11 @@ or .Va name parameter does not exist. .It Bq Er ENOENT +The jail referred to by a +.Va jid +is not accessible by the process, because the process is in a different +jail. +.It Bq Er ENOENT The .Va lastjid parameter is greater than the highest current jail ID. @@ -429,4 +445,4 @@ for R&D Associates who contributed it to .Fx . .An James Gritton -added the extensible jail parameters. +added the extensible jail parameters and hierarchical jails. |