1*8269e767SBrooks Davis.\" Copyright (c) 1999 Poul-Henning Kamp. 2*8269e767SBrooks Davis.\" Copyright (c) 2009 James Gritton. 3*8269e767SBrooks Davis.\" All rights reserved. 4*8269e767SBrooks Davis.\" 5*8269e767SBrooks Davis.\" Redistribution and use in source and binary forms, with or without 6*8269e767SBrooks Davis.\" modification, are permitted provided that the following conditions 7*8269e767SBrooks Davis.\" are met: 8*8269e767SBrooks Davis.\" 1. Redistributions of source code must retain the above copyright 9*8269e767SBrooks Davis.\" notice, this list of conditions and the following disclaimer. 10*8269e767SBrooks Davis.\" 2. Redistributions in binary form must reproduce the above copyright 11*8269e767SBrooks Davis.\" notice, this list of conditions and the following disclaimer in the 12*8269e767SBrooks Davis.\" documentation and/or other materials provided with the distribution. 13*8269e767SBrooks Davis.\" 14*8269e767SBrooks Davis.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15*8269e767SBrooks Davis.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16*8269e767SBrooks Davis.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17*8269e767SBrooks Davis.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18*8269e767SBrooks Davis.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19*8269e767SBrooks Davis.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20*8269e767SBrooks Davis.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21*8269e767SBrooks Davis.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22*8269e767SBrooks Davis.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23*8269e767SBrooks Davis.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24*8269e767SBrooks Davis.\" SUCH DAMAGE. 25*8269e767SBrooks Davis.\" 26*8269e767SBrooks Davis.Dd November 29, 2023 27*8269e767SBrooks Davis.Dt JAIL 2 28*8269e767SBrooks Davis.Os 29*8269e767SBrooks Davis.Sh NAME 30*8269e767SBrooks Davis.Nm jail , 31*8269e767SBrooks Davis.Nm jail_get , 32*8269e767SBrooks Davis.Nm jail_set , 33*8269e767SBrooks Davis.Nm jail_remove , 34*8269e767SBrooks Davis.Nm jail_attach 35*8269e767SBrooks Davis.Nd create and manage system jails 36*8269e767SBrooks Davis.Sh LIBRARY 37*8269e767SBrooks Davis.Lb libc 38*8269e767SBrooks Davis.Sh SYNOPSIS 39*8269e767SBrooks Davis.In sys/param.h 40*8269e767SBrooks Davis.In sys/jail.h 41*8269e767SBrooks Davis.Ft int 42*8269e767SBrooks Davis.Fn jail "struct jail *jail" 43*8269e767SBrooks Davis.Ft int 44*8269e767SBrooks Davis.Fn jail_attach "int jid" 45*8269e767SBrooks Davis.Ft int 46*8269e767SBrooks Davis.Fn jail_remove "int jid" 47*8269e767SBrooks Davis.In sys/uio.h 48*8269e767SBrooks Davis.Ft int 49*8269e767SBrooks Davis.Fn jail_get "struct iovec *iov" "u_int niov" "int flags" 50*8269e767SBrooks Davis.Ft int 51*8269e767SBrooks Davis.Fn jail_set "struct iovec *iov" "u_int niov" "int flags" 52*8269e767SBrooks Davis.Sh DESCRIPTION 53*8269e767SBrooks DavisThe 54*8269e767SBrooks Davis.Fn jail 55*8269e767SBrooks Davissystem call sets up a jail and locks the current process in it. 56*8269e767SBrooks Davis.Pp 57*8269e767SBrooks DavisThe argument is a pointer to a structure describing the prison: 58*8269e767SBrooks Davis.Bd -literal -offset indent 59*8269e767SBrooks Davisstruct jail { 60*8269e767SBrooks Davis uint32_t version; 61*8269e767SBrooks Davis char *path; 62*8269e767SBrooks Davis char *hostname; 63*8269e767SBrooks Davis char *jailname; 64*8269e767SBrooks Davis unsigned int ip4s; 65*8269e767SBrooks Davis unsigned int ip6s; 66*8269e767SBrooks Davis struct in_addr *ip4; 67*8269e767SBrooks Davis struct in6_addr *ip6; 68*8269e767SBrooks Davis}; 69*8269e767SBrooks Davis.Ed 70*8269e767SBrooks Davis.Pp 71*8269e767SBrooks Davis.Dq Li version 72*8269e767SBrooks Davisdefines the version of the API in use. 73*8269e767SBrooks Davis.Dv JAIL_API_VERSION 74*8269e767SBrooks Davisis defined for the current version. 75*8269e767SBrooks Davis.Pp 76*8269e767SBrooks DavisThe 77*8269e767SBrooks Davis.Dq Li path 78*8269e767SBrooks Davispointer should be set to the directory which is to be the root of the 79*8269e767SBrooks Davisprison. 80*8269e767SBrooks Davis.Pp 81*8269e767SBrooks DavisThe 82*8269e767SBrooks Davis.Dq Li hostname 83*8269e767SBrooks Davispointer can be set to the hostname of the prison. 84*8269e767SBrooks DavisThis can be changed 85*8269e767SBrooks Davisfrom the inside of the prison. 86*8269e767SBrooks Davis.Pp 87*8269e767SBrooks DavisThe 88*8269e767SBrooks Davis.Dq Li jailname 89*8269e767SBrooks Davispointer is an optional name that can be assigned to the jail 90*8269e767SBrooks Davisfor example for management purposes. 91*8269e767SBrooks Davis.Pp 92*8269e767SBrooks DavisThe 93*8269e767SBrooks Davis.Dq Li ip4s 94*8269e767SBrooks Davisand 95*8269e767SBrooks Davis.Dq Li ip6s 96*8269e767SBrooks Davisgive the numbers of IPv4 and IPv6 addresses that will be passed 97*8269e767SBrooks Davisvia their respective pointers. 98*8269e767SBrooks Davis.Pp 99*8269e767SBrooks DavisThe 100*8269e767SBrooks Davis.Dq Li ip4 101*8269e767SBrooks Davisand 102*8269e767SBrooks Davis.Dq Li ip6 103*8269e767SBrooks Davispointers can be set to an arrays of IPv4 and IPv6 addresses to be assigned to 104*8269e767SBrooks Davisthe prison, or NULL if none. 105*8269e767SBrooks DavisIPv4 addresses must be in network byte order. 106*8269e767SBrooks Davis.Pp 107*8269e767SBrooks DavisThis is equivalent to, and deprecated in favor of, the 108*8269e767SBrooks Davis.Fn jail_set 109*8269e767SBrooks Davissystem call (see below), with the parameters 110*8269e767SBrooks Davis.Va path , 111*8269e767SBrooks Davis.Va host.hostname , 112*8269e767SBrooks Davis.Va name , 113*8269e767SBrooks Davis.Va ip4.addr , 114*8269e767SBrooks Davisand 115*8269e767SBrooks Davis.Va ip6.addr , 116*8269e767SBrooks Davisand with the 117*8269e767SBrooks Davis.Dv JAIL_ATTACH 118*8269e767SBrooks Davisflag. 119*8269e767SBrooks Davis.Pp 120*8269e767SBrooks DavisThe 121*8269e767SBrooks Davis.Fn jail_set 122*8269e767SBrooks Davissystem call creates a new jail, or modifies an existing one, and optionally 123*8269e767SBrooks Davislocks the current process in it. 124*8269e767SBrooks DavisJail parameters are passed as an array of name-value pairs in the array 125*8269e767SBrooks Davis.Fa iov , 126*8269e767SBrooks Daviscontaining 127*8269e767SBrooks Davis.Fa niov 128*8269e767SBrooks Daviselements. 129*8269e767SBrooks DavisParameter names are a null-terminated string, and values may be strings, 130*8269e767SBrooks Davisintegers, or other arbitrary data. 131*8269e767SBrooks DavisSome parameters are boolean, and do not have a value (their length is zero) 132*8269e767SBrooks Davisbut are set by the name alone with or without a 133*8269e767SBrooks Davis.Dq no 134*8269e767SBrooks Davisprefix, e.g. 135*8269e767SBrooks Davis.Va persist 136*8269e767SBrooks Davisor 137*8269e767SBrooks Davis.Va nopersist . 138*8269e767SBrooks DavisAny parameters not set will be given default values, generally based on 139*8269e767SBrooks Davisthe current environment. 140*8269e767SBrooks Davis.Pp 141*8269e767SBrooks DavisJails have a set of core parameters, and modules can add their own jail 142*8269e767SBrooks Davisparameters. 143*8269e767SBrooks DavisThe current set of available parameters, and their formats, can be 144*8269e767SBrooks Davisretrieved via the 145*8269e767SBrooks Davis.Va security.jail.param 146*8269e767SBrooks Davissysctl MIB entry. 147*8269e767SBrooks DavisNotable parameters include those mentioned in the 148*8269e767SBrooks Davis.Fn jail 149*8269e767SBrooks Davisdescription above, as well as 150*8269e767SBrooks Davis.Va jid 151*8269e767SBrooks Davisand 152*8269e767SBrooks Davis.Va name , 153*8269e767SBrooks Daviswhich identify the jail being created or modified. 154*8269e767SBrooks DavisSee 155*8269e767SBrooks Davis.Xr jail 8 156*8269e767SBrooks Davisfor more information on the core jail parameters. 157*8269e767SBrooks Davis.Pp 158*8269e767SBrooks DavisThe 159*8269e767SBrooks Davis.Fa flags 160*8269e767SBrooks Davisarguments consists of one or more of the following flags: 161*8269e767SBrooks Davis.Bl -tag -width indent 162*8269e767SBrooks Davis.It Dv JAIL_CREATE 163*8269e767SBrooks DavisCreate a new jail. 164*8269e767SBrooks DavisIf a 165*8269e767SBrooks Davis.Va jid 166*8269e767SBrooks Davisor 167*8269e767SBrooks Davis.Va name 168*8269e767SBrooks Davisparameters exists, they must not refer to an existing jail. 169*8269e767SBrooks Davis.It Dv JAIL_UPDATE 170*8269e767SBrooks DavisModify an existing jail. 171*8269e767SBrooks DavisOne of the 172*8269e767SBrooks Davis.Va jid 173*8269e767SBrooks Davisor 174*8269e767SBrooks Davis.Va name 175*8269e767SBrooks Davisparameters must exist, and must refer to an existing jail. 176*8269e767SBrooks DavisIf both 177*8269e767SBrooks Davis.Dv JAIL_CREATE 178*8269e767SBrooks Davisand 179*8269e767SBrooks Davis.Dv JAIL_UPDATE 180*8269e767SBrooks Davisare set, a jail will be created if it does not yet exist, and modified if it 181*8269e767SBrooks Davisdoes exist. 182*8269e767SBrooks Davis.It Dv JAIL_ATTACH 183*8269e767SBrooks DavisIn addition to creating or modifying the jail, attach the current process to 184*8269e767SBrooks Davisit, as with the 185*8269e767SBrooks Davis.Fn jail_attach 186*8269e767SBrooks Davissystem call. 187*8269e767SBrooks Davis.It Dv JAIL_DYING 188*8269e767SBrooks DavisThis is deprecated in 189*8269e767SBrooks Davis.Fn jail_set 190*8269e767SBrooks Davisand has no effect. 191*8269e767SBrooks Davis.El 192*8269e767SBrooks Davis.Pp 193*8269e767SBrooks DavisThe 194*8269e767SBrooks Davis.Fn jail_get 195*8269e767SBrooks Davissystem call retrieves jail parameters, using the same name-value list as 196*8269e767SBrooks Davis.Fn jail_set 197*8269e767SBrooks Davisin the 198*8269e767SBrooks Davis.Fa iov 199*8269e767SBrooks Davisand 200*8269e767SBrooks Davis.Fa niov 201*8269e767SBrooks Davisarguments. 202*8269e767SBrooks DavisThe jail to read can be specified by either 203*8269e767SBrooks Davis.Va jid 204*8269e767SBrooks Davisor 205*8269e767SBrooks Davis.Va name 206*8269e767SBrooks Davisby including those parameters in the list. 207*8269e767SBrooks DavisIf they are included but are not intended to be the search key, they 208*8269e767SBrooks Davisshould be cleared (zero and the empty string respectively). 209*8269e767SBrooks Davis.Pp 210*8269e767SBrooks DavisThe special parameter 211*8269e767SBrooks Davis.Va lastjid 212*8269e767SBrooks Daviscan be used to retrieve a list of all jails. 213*8269e767SBrooks DavisIt will fetch the jail with the jid above and closest to the passed value. 214*8269e767SBrooks DavisThe first jail (usually but not always jid 1) can be found by passing a 215*8269e767SBrooks Davis.Va lastjid 216*8269e767SBrooks Davisof zero. 217*8269e767SBrooks Davis.Pp 218*8269e767SBrooks DavisThe 219*8269e767SBrooks Davis.Fa flags 220*8269e767SBrooks Davisarguments consists of one or more following flags: 221*8269e767SBrooks Davis.Bl -tag -width indent 222*8269e767SBrooks Davis.It Dv JAIL_DYING 223*8269e767SBrooks DavisAllow getting a jail that is in the process of being removed. 224*8269e767SBrooks Davis.El 225*8269e767SBrooks Davis.Pp 226*8269e767SBrooks DavisThe 227*8269e767SBrooks Davis.Fn jail_attach 228*8269e767SBrooks Davissystem call attaches the current process to an existing jail, 229*8269e767SBrooks Davisidentified by 230*8269e767SBrooks Davis.Fa jid . 231*8269e767SBrooks DavisIt changes the process's root and current directories to the jail's 232*8269e767SBrooks Davis.Va path 233*8269e767SBrooks Davisdirectory. 234*8269e767SBrooks Davis.Pp 235*8269e767SBrooks DavisThe 236*8269e767SBrooks Davis.Fn jail_remove 237*8269e767SBrooks Davissystem call removes the jail identified by 238*8269e767SBrooks Davis.Fa jid . 239*8269e767SBrooks DavisIt will kill all processes belonging to the jail, and remove any children 240*8269e767SBrooks Davisof that jail. 241*8269e767SBrooks Davis.Sh RETURN VALUES 242*8269e767SBrooks DavisIf successful, 243*8269e767SBrooks Davis.Fn jail , 244*8269e767SBrooks Davis.Fn jail_set , 245*8269e767SBrooks Davisand 246*8269e767SBrooks Davis.Fn jail_get 247*8269e767SBrooks Davisreturn a non-negative integer, termed the jail identifier (JID). 248*8269e767SBrooks DavisThey return \-1 on failure, and set 249*8269e767SBrooks Davis.Va errno 250*8269e767SBrooks Davisto indicate the error. 251*8269e767SBrooks Davis.Pp 252*8269e767SBrooks Davis.Rv -std jail_attach jail_remove 253*8269e767SBrooks Davis.Sh ERRORS 254*8269e767SBrooks DavisThe 255*8269e767SBrooks Davis.Fn jail 256*8269e767SBrooks Davissystem call 257*8269e767SBrooks Daviswill fail if: 258*8269e767SBrooks Davis.Bl -tag -width Er 259*8269e767SBrooks Davis.It Bq Er EPERM 260*8269e767SBrooks DavisThis process is not allowed to create a jail, either because it is not 261*8269e767SBrooks Davisthe super-user, or because it would exceed the jail's 262*8269e767SBrooks Davis.Va children.max 263*8269e767SBrooks Davislimit. 264*8269e767SBrooks Davis.It Bq Er EFAULT 265*8269e767SBrooks Davis.Fa jail 266*8269e767SBrooks Davispoints to an address outside the allocated address space of the process. 267*8269e767SBrooks Davis.It Bq Er EINVAL 268*8269e767SBrooks DavisThe version number of the argument is not correct. 269*8269e767SBrooks Davis.It Bq Er EAGAIN 270*8269e767SBrooks DavisNo free JID could be found. 271*8269e767SBrooks Davis.El 272*8269e767SBrooks Davis.Pp 273*8269e767SBrooks DavisThe 274*8269e767SBrooks Davis.Fn jail_set 275*8269e767SBrooks Davissystem call 276*8269e767SBrooks Daviswill fail if: 277*8269e767SBrooks Davis.Bl -tag -width Er 278*8269e767SBrooks Davis.It Bq Er EPERM 279*8269e767SBrooks DavisThis process is not allowed to create a jail, either because it is not 280*8269e767SBrooks Davisthe super-user, or because it would exceed the jail's 281*8269e767SBrooks Davis.Va children.max 282*8269e767SBrooks Davislimit. 283*8269e767SBrooks Davis.It Bq Er EPERM 284*8269e767SBrooks DavisA jail parameter was set to a less restrictive value then the current 285*8269e767SBrooks Davisenvironment. 286*8269e767SBrooks Davis.It Bq Er EFAULT 287*8269e767SBrooks Davis.Fa Iov , 288*8269e767SBrooks Davisor one of the addresses contained within it, 289*8269e767SBrooks Davispoints to an address outside the allocated address space of the process. 290*8269e767SBrooks Davis.It Bq Er ENOENT 291*8269e767SBrooks DavisThe jail referred to by a 292*8269e767SBrooks Davis.Va jid 293*8269e767SBrooks Davisor 294*8269e767SBrooks Davis.Va name 295*8269e767SBrooks Davisparameter does not exist, and the 296*8269e767SBrooks Davis.Dv JAIL_CREATE 297*8269e767SBrooks Davisflag is not set. 298*8269e767SBrooks Davis.It Bq Er ENOENT 299*8269e767SBrooks DavisThe jail referred to by a 300*8269e767SBrooks Davis.Va jid 301*8269e767SBrooks Davisis not accessible by the process, because the process is in a different 302*8269e767SBrooks Davisjail. 303*8269e767SBrooks Davis.It Bq Er EEXIST 304*8269e767SBrooks DavisThe jail referred to by a 305*8269e767SBrooks Davis.Va jid 306*8269e767SBrooks Davisor 307*8269e767SBrooks Davis.Va name 308*8269e767SBrooks Davisparameter exists, and the 309*8269e767SBrooks Davis.Dv JAIL_UPDATE 310*8269e767SBrooks Davisflag is not set. 311*8269e767SBrooks Davis.It Bq Er EINVAL 312*8269e767SBrooks DavisA supplied parameter is the wrong size. 313*8269e767SBrooks Davis.It Bq Er EINVAL 314*8269e767SBrooks DavisA supplied parameter is out of range. 315*8269e767SBrooks Davis.It Bq Er EINVAL 316*8269e767SBrooks DavisA supplied string parameter is not null-terminated. 317*8269e767SBrooks Davis.It Bq Er EINVAL 318*8269e767SBrooks DavisA supplied parameter name does not match any known parameters. 319*8269e767SBrooks Davis.It Bq Er EINVAL 320*8269e767SBrooks DavisOne of the 321*8269e767SBrooks Davis.Dv JAIL_CREATE 322*8269e767SBrooks Davisor 323*8269e767SBrooks Davis.Dv JAIL_UPDATE 324*8269e767SBrooks Davisflags is not set. 325*8269e767SBrooks Davis.It Bq Er ENAMETOOLONG 326*8269e767SBrooks DavisA supplied string parameter is longer than allowed. 327*8269e767SBrooks Davis.It Bq Er EAGAIN 328*8269e767SBrooks DavisThere are no jail IDs left. 329*8269e767SBrooks Davis.El 330*8269e767SBrooks Davis.Pp 331*8269e767SBrooks DavisThe 332*8269e767SBrooks Davis.Fn jail_get 333*8269e767SBrooks Davissystem call 334*8269e767SBrooks Daviswill fail if: 335*8269e767SBrooks Davis.Bl -tag -width Er 336*8269e767SBrooks Davis.It Bq Er EFAULT 337*8269e767SBrooks Davis.Fa Iov , 338*8269e767SBrooks Davisor one of the addresses contained within it, 339*8269e767SBrooks Davispoints to an address outside the allocated address space of the process. 340*8269e767SBrooks Davis.It Bq Er ENOENT 341*8269e767SBrooks DavisThe jail referred to by a 342*8269e767SBrooks Davis.Va jid 343*8269e767SBrooks Davisor 344*8269e767SBrooks Davis.Va name 345*8269e767SBrooks Davisparameter does not exist. 346*8269e767SBrooks Davis.It Bq Er ENOENT 347*8269e767SBrooks DavisThe jail referred to by a 348*8269e767SBrooks Davis.Va jid 349*8269e767SBrooks Davisis not accessible by the process, because the process is in a different 350*8269e767SBrooks Davisjail. 351*8269e767SBrooks Davis.It Bq Er ENOENT 352*8269e767SBrooks DavisThe 353*8269e767SBrooks Davis.Va lastjid 354*8269e767SBrooks Davisparameter is greater than the highest current jail ID. 355*8269e767SBrooks Davis.It Bq Er EINVAL 356*8269e767SBrooks DavisA supplied parameter is the wrong size. 357*8269e767SBrooks Davis.It Bq Er EINVAL 358*8269e767SBrooks DavisA supplied parameter name does not match any known parameters. 359*8269e767SBrooks Davis.El 360*8269e767SBrooks Davis.Pp 361*8269e767SBrooks DavisThe 362*8269e767SBrooks Davis.Fn jail_attach 363*8269e767SBrooks Davisand 364*8269e767SBrooks Davis.Fn jail_remove 365*8269e767SBrooks Davissystem calls 366*8269e767SBrooks Daviswill fail if: 367*8269e767SBrooks Davis.Bl -tag -width Er 368*8269e767SBrooks Davis.It Bq Er EPERM 369*8269e767SBrooks DavisA user other than the super-user attempted to attach to or remove a jail. 370*8269e767SBrooks Davis.It Bq Er EINVAL 371*8269e767SBrooks DavisThe jail specified by 372*8269e767SBrooks Davis.Fa jid 373*8269e767SBrooks Davisdoes not exist. 374*8269e767SBrooks Davis.El 375*8269e767SBrooks Davis.Pp 376*8269e767SBrooks DavisFurther 377*8269e767SBrooks Davis.Fn jail , 378*8269e767SBrooks Davis.Fn jail_set , 379*8269e767SBrooks Davisand 380*8269e767SBrooks Davis.Fn jail_attach 381*8269e767SBrooks Daviscall 382*8269e767SBrooks Davis.Xr chroot 2 383*8269e767SBrooks Davisinternally, so they can fail for all the same reasons. 384*8269e767SBrooks DavisPlease consult the 385*8269e767SBrooks Davis.Xr chroot 2 386*8269e767SBrooks Davismanual page for details. 387*8269e767SBrooks Davis.Sh SEE ALSO 388*8269e767SBrooks Davis.Xr chdir 2 , 389*8269e767SBrooks Davis.Xr chroot 2 , 390*8269e767SBrooks Davis.Xr jail 8 391*8269e767SBrooks Davis.Sh HISTORY 392*8269e767SBrooks DavisThe 393*8269e767SBrooks Davis.Fn jail 394*8269e767SBrooks Davissystem call appeared in 395*8269e767SBrooks Davis.Fx 4.0 . 396*8269e767SBrooks DavisThe 397*8269e767SBrooks Davis.Fn jail_attach 398*8269e767SBrooks Davissystem call appeared in 399*8269e767SBrooks Davis.Fx 5.1 . 400*8269e767SBrooks DavisThe 401*8269e767SBrooks Davis.Fn jail_set , 402*8269e767SBrooks Davis.Fn jail_get , 403*8269e767SBrooks Davisand 404*8269e767SBrooks Davis.Fn jail_remove 405*8269e767SBrooks Davissystem calls appeared in 406*8269e767SBrooks Davis.Fx 8.0 . 407*8269e767SBrooks Davis.Sh AUTHORS 408*8269e767SBrooks DavisThe jail feature was written by 409*8269e767SBrooks Davis.An Poul-Henning Kamp 410*8269e767SBrooks Davisfor R&D Associates 411*8269e767SBrooks Daviswho contributed it to 412*8269e767SBrooks Davis.Fx . 413*8269e767SBrooks Davis.An James Gritton 414*8269e767SBrooks Davisadded the extensible jail parameters and hierarchical jails. 415