]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - usr.sbin/jail/jail.8
Document an issue of jail(8) in conjunction with cpuset(1).
[FreeBSD/releng/7.2.git] / usr.sbin / jail / jail.8
1 .\"
2 .\" Copyright (c) 2000, 2003 Robert N. M. Watson
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\"
27 .\" ----------------------------------------------------------------------------
28 .\" "THE BEER-WARE LICENSE" (Revision 42):
29 .\" <phk@FreeBSD.ORG> wrote this file.  As long as you retain this notice you
30 .\" can do whatever you want with this stuff. If we meet some day, and you think
31 .\" this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
32 .\" ----------------------------------------------------------------------------
33 .\"
34 .\" $FreeBSD$
35 .\"
36 .Dd January 24, 2009
37 .Dt JAIL 8
38 .Os
39 .Sh NAME
40 .Nm jail
41 .Nd "imprison process and its descendants"
42 .Sh SYNOPSIS
43 .Nm
44 .Op Fl hi
45 .Op Fl n Ar jailname
46 .Op Fl J Ar jid_file
47 .Op Fl s Ar securelevel
48 .Op Fl l u Ar username | Fl U Ar username
49 .Ar path hostname [ip[,..]] command ...
50 .Sh DESCRIPTION
51 The
52 .Nm
53 utility imprisons a process and all future descendants.
54 .Pp
55 The options are as follows:
56 .Bl -tag -width ".Fl u Ar username"
57 .It Fl h
58 Resolve
59 .Va hostname
60 and add all IP addresses returned by the resolver
61 to the list of
62 .Va ip-addresses
63 for this prison.
64 This may affect default address selection for outgoing IPv4 connections
65 of prisons.
66 The address first returned by the resolver for each address family
67 will be used as primary address.
68 See
69 .Va ip-addresses
70 further down for details.
71 .It Fl i
72 Output the jail identifier of the newly created jail.
73 .It Fl n Ar jailname
74 Assign and administrative name to the jail that can be used for management
75 or auditing purposes.
76 The system will
77 .Sy not enforce
78 the name to be unique.
79 .It Fl J Ar jid_file
80 Write a
81 .Ar jid_file
82 file, containing jail identifier, path, hostname, IP and
83 command used to start the jail.
84 .It Fl l
85 Run program in the clean environment.
86 The environment is discarded except for
87 .Ev HOME , SHELL , TERM
88 and
89 .Ev USER .
90 .Ev HOME
91 and
92 .Ev SHELL
93 are set to the target login's default values.
94 .Ev USER
95 is set to the target login.
96 .Ev TERM
97 is imported from the current environment.
98 The environment variables from the login class capability database for the
99 target login are also set.
100 .It Fl s Ar securelevel
101 Sets the
102 .Va kern.securelevel
103 sysctl variable to the specified value inside the newly created jail.
104 .It Fl u Ar username
105 The user name from host environment as whom the
106 .Ar command
107 should run.
108 .It Fl U Ar username
109 The user name from jailed environment as whom the
110 .Ar command
111 should run.
112 .It Ar path
113 Directory which is to be the root of the prison.
114 .It Ar hostname
115 Hostname of the prison.
116 .It Ar ip-addresses
117 None, one or more IPv4 and IPv6 addresses assigned to the prison.
118 The first address of each address family that was assigned to the jail will
119 be used as the source address in case source address selection on unbound
120 sockets cannot find a better match.
121 It is only possible to start multiple jails with the same IP address,
122 if none of the jails has more than this single overlapping IP address
123 assigned to itself for the address family in question.
124 .It Ar command
125 Pathname of the program which is to be executed.
126 .El
127 .Pp
128 Jails are typically set up using one of two philosophies: either to
129 constrain a specific application (possibly running with privilege), or
130 to create a
131 .Dq "virtual system image"
132 running a variety of daemons and services.
133 In both cases, a fairly complete file system install of
134 .Fx
135 is
136 required, so as to provide the necessary command line tools, daemons,
137 libraries, application configuration files, etc.
138 However, for a virtual server configuration, a fair amount of
139 additional work is required so as to configure the
140 .Dq boot
141 process.
142 This manual page documents the configuration steps necessary to support
143 either of these steps, although the configuration steps may be
144 refined based on local requirements.
145 .Pp
146 Please see the
147 .Xr jail 2
148 man page for further details.
149 .Sh EXAMPLES
150 .Ss "Setting up a Jail Directory Tree"
151 To set up a jail directory tree containing an entire
152 .Fx
153 distribution, the following
154 .Xr sh 1
155 command script can be used:
156 .Bd -literal
157 D=/here/is/the/jail
158 cd /usr/src
159 mkdir -p $D
160 make world DESTDIR=$D
161 make distribution DESTDIR=$D
162 mount -t devfs devfs $D/dev
163 .Ed
164 .Pp
165 NOTE: It is important that only appropriate device nodes in devfs be
166 exposed to a jail; access to disk devices in the jail may permit processes
167 in the jail to bypass the jail sandboxing by modifying files outside of
168 the jail.
169 See
170 .Xr devfs 8
171 for information on how to use devfs rules to limit access to entries
172 in the per-jail devfs.
173 A simple devfs ruleset for jails is available as ruleset #4 in
174 .Pa /etc/defaults/devfs.rules .
175 .Pp
176 In many cases this example would put far more in the jail than needed.
177 In the other extreme case a jail might contain only one file:
178 the executable to be run in the jail.
179 .Pp
180 We recommend experimentation and caution that it is a lot easier to
181 start with a
182 .Dq fat
183 jail and remove things until it stops working,
184 than it is to start with a
185 .Dq thin
186 jail and add things until it works.
187 .Ss "Setting Up a Jail"
188 Do what was described in
189 .Sx "Setting Up a Jail Directory Tree"
190 to build the jail directory tree.
191 For the sake of this example, we will
192 assume you built it in
193 .Pa /data/jail/192.0.2.100 ,
194 named for the jailed IP address.
195 Substitute below as needed with your
196 own directory, IP address, and hostname.
197 .Ss "Setting up the Host Environment"
198 First, you will want to set up your real system's environment to be
199 .Dq jail-friendly .
200 For consistency, we will refer to the parent box as the
201 .Dq "host environment" ,
202 and to the jailed virtual machine as the
203 .Dq "jail environment" .
204 Since jail is implemented using IP aliases, one of the first things to do
205 is to disable IP services on the host system that listen on all local
206 IP addresses for a service.
207 If a network service is present in the host environment that binds all
208 available IP addresses rather than specific IP addresses, it may service
209 requests sent to jail IP addresses if the jail did not bind the port.
210 This means changing
211 .Xr inetd 8
212 to only listen on the
213 appropriate IP address, and so forth.
214 Add the following to
215 .Pa /etc/rc.conf
216 in the host environment:
217 .Bd -literal -offset indent
218 sendmail_enable="NO"
219 inetd_flags="-wW -a 192.0.2.23"
220 rpcbind_enable="NO"
221 .Ed
222 .Pp
223 .Li 192.0.2.23
224 is the native IP address for the host system, in this example.
225 Daemons that run out of
226 .Xr inetd 8
227 can be easily set to use only the specified host IP address.
228 Other daemons
229 will need to be manually configured\(emfor some this is possible through
230 the
231 .Xr rc.conf 5
232 flags entries; for others it is necessary to modify per-application
233 configuration files, or to recompile the applications.
234 The following frequently deployed services must have their individual
235 configuration files modified to limit the application to listening
236 to a specific IP address:
237 .Pp
238 To configure
239 .Xr sshd 8 ,
240 it is necessary to modify
241 .Pa /etc/ssh/sshd_config .
242 .Pp
243 To configure
244 .Xr sendmail 8 ,
245 it is necessary to modify
246 .Pa /etc/mail/sendmail.cf .
247 .Pp
248 For
249 .Xr named 8 ,
250 it is necessary to modify
251 .Pa /etc/namedb/named.conf .
252 .Pp
253 In addition, a number of services must be recompiled in order to run
254 them in the host environment.
255 This includes most applications providing services using
256 .Xr rpc 3 ,
257 such as
258 .Xr rpcbind 8 ,
259 .Xr nfsd 8 ,
260 and
261 .Xr mountd 8 .
262 In general, applications for which it is not possible to specify which
263 IP address to bind should not be run in the host environment unless they
264 should also service requests sent to jail IP addresses.
265 Attempting to serve
266 NFS from the host environment may also cause confusion, and cannot be
267 easily reconfigured to use only specific IPs, as some NFS services are
268 hosted directly from the kernel.
269 Any third-party network software running
270 in the host environment should also be checked and configured so that it
271 does not bind all IP addresses, which would result in those services' also
272 appearing to be offered by the jail environments.
273 .Pp
274 Once
275 these daemons have been disabled or fixed in the host environment, it is
276 best to reboot so that all daemons are in a known state, to reduce the
277 potential for confusion later (such as finding that when you send mail
278 to a jail, and its sendmail is down, the mail is delivered to the host,
279 etc.).
280 .Ss "Configuring the Jail"
281 Start any jail for the first time without configuring the network
282 interface so that you can clean it up a little and set up accounts.
283 As
284 with any machine (virtual or not) you will need to set a root password, time
285 zone, etc.
286 Some of these steps apply only if you intend to run a full virtual server
287 inside the jail; others apply both for constraining a particular application
288 or for running a virtual server.
289 .Pp
290 Start a shell in the jail:
291 .Pp
292 .Dl "jail /data/jail/192.0.2.100 testhostname 192.0.2.100 /bin/sh"
293 .Pp
294 Assuming no errors, you will end up with a shell prompt within the jail.
295 You can now run
296 .Pa /usr/sbin/sysinstall
297 and do the post-install configuration to set various configuration options,
298 or perform these actions manually by editing
299 .Pa /etc/rc.conf ,
300 etc.
301 .Pp
302 .Bl -bullet -offset indent -compact
303 .It
304 Create an empty
305 .Pa /etc/fstab
306 to quell startup warnings about missing fstab (virtual server only)
307 .It
308 Disable the port mapper
309 .Pa ( /etc/rc.conf :
310 .Li rpcbind_enable="NO" )
311 (virtual server only)
312 .It
313 Configure
314 .Pa /etc/resolv.conf
315 so that name resolution within the jail will work correctly
316 .It
317 Run
318 .Xr newaliases 1
319 to quell
320 .Xr sendmail 8
321 warnings.
322 .It
323 Disable interface configuration to quell startup warnings about
324 .Xr ifconfig 8
325 .Pq Li network_interfaces=""
326 (virtual server only)
327 .It
328 Set a root password, probably different from the real host system
329 .It
330 Set the timezone
331 .It
332 Add accounts for users in the jail environment
333 .It
334 Install any packages the environment requires
335 .El
336 .Pp
337 You may also want to perform any package-specific configuration (web servers,
338 SSH servers, etc), patch up
339 .Pa /etc/syslog.conf
340 so it logs as you would like, etc.
341 If you are not using a virtual server, you may wish to modify
342 .Xr syslogd 8
343 in the host environment to listen on the syslog socket in the jail
344 environment; in this example, the syslog socket would be stored in
345 .Pa /data/jail/192.0.2.100/var/run/log .
346 .Pp
347 Exit from the shell, and the jail will be shut down.
348 .Ss "Starting the Jail"
349 You are now ready to restart the jail and bring up the environment with
350 all of its daemons and other programs.
351 If you are running a single application in the jail, substitute the
352 command used to start the application for
353 .Pa /etc/rc
354 in the examples below.
355 To start a virtual server environment,
356 .Pa /etc/rc
357 is run to launch various daemons and services.
358 To do this, first bring up the
359 virtual host interface, and then start the jail's
360 .Pa /etc/rc
361 script from within the jail.
362 .Pp
363 NOTE: If you plan to allow untrusted users to have root access inside the
364 jail, you may wish to consider setting the
365 .Va security.jail.set_hostname_allowed
366 sysctl variable to 0.
367 Please see the management discussion later in this document as to why this
368 may be a good idea.
369 If you do decide to set this variable,
370 it must be set before starting any jails, and once each boot.
371 .Bd -literal -offset indent
372 ifconfig ed0 inet alias 192.0.2.100/32
373 mount -t procfs proc /data/jail/192.0.2.100/proc
374 jail /data/jail/192.0.2.100 testhostname 192.0.2.100 \\
375         /bin/sh /etc/rc
376 .Ed
377 .Pp
378 A few warnings will be produced, because most
379 .Xr sysctl 8
380 configuration variables cannot be set from within the jail, as they are
381 global across all jails and the host environment.
382 However, it should all
383 work properly.
384 You should be able to see
385 .Xr inetd 8 ,
386 .Xr syslogd 8 ,
387 and other processes running within the jail using
388 .Xr ps 1 ,
389 with the
390 .Ql J
391 flag appearing beside jailed processes.
392 To see an active list of jails, use the
393 .Xr jls 8
394 utility.
395 You should also be able to
396 .Xr telnet 1
397 to the hostname or IP address of the jailed environment, and log
398 in using the accounts you created previously.
399 .Pp
400 It is possible to have jails started at boot time.
401 Please refer to the
402 .Dq jail_*
403 variables in
404 .Xr rc.conf 5
405 for more information.
406 The
407 .Xr rc 8
408 jail script provides a flexible system to start/stop jails:
409 .Bd -literal
410 /etc/rc.d/jail start
411 /etc/rc.d/jail stop
412 /etc/rc.d/jail start myjail
413 /etc/rc.d/jail stop myjail
414 .Ed
415 .Ss "Managing the Jail"
416 Normal machine shutdown commands, such as
417 .Xr halt 8 ,
418 .Xr reboot 8 ,
419 and
420 .Xr shutdown 8 ,
421 cannot be used successfully within the jail.
422 To kill all processes in a
423 jail, you may log into the jail and, as root, use one of the following
424 commands, depending on what you want to accomplish:
425 .Pp
426 .Bd -literal -offset indent
427 kill -TERM -1
428 kill -KILL -1
429 .Ed
430 .Pp
431 This will send the
432 .Dv SIGTERM
433 or
434 .Dv SIGKILL
435 signals to all processes in the jail from within the jail.
436 Depending on
437 the intended use of the jail, you may also want to run
438 .Pa /etc/rc.shutdown
439 from within the jail.
440 To kill processes from outside the jail, use the
441 .Xr jexec 8
442 utility in conjunction with the one of the
443 .Xr kill 1
444 commands above.
445 .Pp
446 The
447 .Pa /proc/ Ns Ar pid Ns Pa /status
448 file contains, as its last field, the hostname of the jail in which the
449 process runs, or
450 .Dq Li -
451 to indicate that the process is not running within a jail.
452 The
453 .Xr ps 1
454 command also shows a
455 .Ql J
456 flag for processes in a jail.
457 However, the hostname for a jail may be, by
458 default, modified from within the jail, so the
459 .Pa /proc
460 status entry is unreliable by default.
461 To disable the setting of the hostname
462 from within a jail, set the
463 .Va security.jail.set_hostname_allowed
464 sysctl variable in the host environment to 0, which will affect all jails.
465 You can have this sysctl set on each boot using
466 .Xr sysctl.conf 5 .
467 Just add the following line to
468 .Pa /etc/sysctl.conf :
469 .Pp
470 .Dl security.jail.set_hostname_allowed=0
471 .Pp
472 You can also list/kill processes based on their jail ID.
473 To show processes and their jail ID, use the following command:
474 .Pp
475 .Dl "ps ax -o pid,jid,args"
476 .Pp
477 To show and then kill processes in jail number 3 use the following commands:
478 .Bd -literal -offset indent
479 pgrep -lfj 3
480 pkill -j 3
481 .Ed
482 or:
483 .Pp
484 .Dl "killall -j 3"
485 .Ss "Jails and File Systems"
486 It is not possible to
487 .Xr mount 8
488 or
489 .Xr umount 8
490 any file system inside a jail unless the file system is marked
491 jail-friendly.
492 See
493 .Va security.jail.mount_allowed
494 in the
495 .Va "Sysctl MIB Entries"
496 section.
497 .Pp
498 Multiple jails sharing the same file system can influence each other.
499 For example a user in one jail can fill the file system also
500 leaving no space for processes in the other jail.
501 Trying to use
502 .Xr quota 1
503 to prevent this will not work either as the file system quotas
504 are not aware of jails but only look at the user and group IDs.
505 This means the same user ID in two jails share the same file
506 system quota.
507 One would need to use one file system per jail to make this working.
508 .Ss "Sysctl MIB Entries"
509 Certain aspects of the jail containments environment may be modified from
510 the host environment using
511 .Xr sysctl 8
512 MIB variables.
513 Currently, these variables affect all jails on the system, although in
514 the future this functionality may be finer grained.
515 .Bl -tag -width XXX
516 .It Va security.jail.allow_raw_sockets
517 This MIB entry determines whether or not prison root is allowed to
518 create raw sockets.
519 Setting this MIB to 1 allows utilities like
520 .Xr ping 8
521 and
522 .Xr traceroute 8
523 to operate inside the prison.
524 If this MIB
525 is set, the source IP addresses are enforced to comply
526 with the IP address bound to the jail, regardless of whether or not
527 the
528 .Dv IP_HDRINCL
529 flag has been set on the socket.
530 Since raw sockets can be used to configure
531 and interact with various network subsystems, extra caution should be used
532 where privileged access to jails is given out to untrusted parties.
533 As such,
534 by default this option is disabled.
535 .It Va security.jail.enforce_statfs
536 This MIB entry determines which information processes in a jail are
537 able to get about mount-points.
538 It affects the behaviour of the following syscalls:
539 .Xr statfs 2 ,
540 .Xr fstatfs 2 ,
541 .Xr getfsstat 2
542 and
543 .Xr fhstatfs 2
544 (as well as similar compatibility syscalls).
545 When set to 0, all mount-points are available without any restrictions.
546 When set to 1, only mount-points below the jail's chroot directory are
547 visible.
548 In addition to that, the path to the jail's chroot directory is removed
549 from the front of their pathnames.
550 When set to 2 (default), above syscalls can operate only on a mount-point
551 where the jail's chroot directory is located.
552 .It Va security.jail.set_hostname_allowed
553 This MIB entry determines whether or not processes within a jail are
554 allowed to change their hostname via
555 .Xr hostname 1
556 or
557 .Xr sethostname 3 .
558 In the current jail implementation, the ability to set the hostname from
559 within the jail can impact management tools relying on the accuracy of jail
560 information in
561 .Pa /proc .
562 As such, this should be disabled in environments where privileged access to
563 jails is given out to untrusted parties.
564 .It Va security.jail.socket_unixiproute_only
565 The jail functionality binds an IPv4 address to each jail, and limits
566 access to other network addresses in the IPv4 space that may be available
567 in the host environment.
568 However, jail is not currently able to limit access to other network
569 protocol stacks that have not had jail functionality added to them.
570 As such, by default, processes within jails may only access protocols
571 in the following domains:
572 .Dv PF_LOCAL , PF_INET ,
573 and
574 .Dv PF_ROUTE ,
575 permitting them access to
576 .Ux
577 domain sockets,
578 IPv4 addresses, and routing sockets.
579 To enable access to other domains, this MIB variable may be set to
580 0.
581 .It Va security.jail.sysvipc_allowed
582 This MIB entry determines whether or not processes within a jail have access
583 to System V IPC primitives.
584 In the current jail implementation, System V primitives share a single
585 namespace across the host and jail environments, meaning that processes
586 within a jail would be able to communicate with (and potentially interfere
587 with) processes outside of the jail, and in other jails.
588 As such, this functionality is disabled by default, but can be enabled
589 by setting this MIB entry to 1.
590 .It Va security.jail.chflags_allowed
591 This MIB entry determines how a privileged user inside a jail will be
592 treated by
593 .Xr chflags 2 .
594 If zero, such users are treated as unprivileged, and are unable to set
595 or clear system file flags; if non-zero, such users are treated as
596 privileged, and may manipulate system file flags subject to the usual
597 constraints on
598 .Va kern.securelevel .
599 .It Va security.jail.mount_allowed
600 This MIB entry determines if a privileged user inside a jail will be
601 able to mount and unmount file system types marked as jail-friendly.
602 The
603 .Xr lsvfs 1
604 command can be used to find file system types available for mount from within
605 a jail.
606 This functionality is disabled by default, but can be enabled by setting this
607 MIB entry to 1.
608 .It Va security.jail.jail_max_af_ips
609 This MIB entry determines how may address per address family a prison
610 may have. The default is 255.
611 .El
612 .Pp
613 The read-only sysctl variable
614 .Va security.jail.jailed
615 can be used to determine if a process is running inside a jail (value
616 is one) or not (value is zero).
617 .Pp
618 The
619 .Va security.jail.list
620 MIB entry is read-only and it returns an array of
621 .Vt "struct xprison"
622 defined in
623 .In sys/jail.h .
624 It is recommended to use the
625 .Xr jls 8
626 utility to see current active list of jails.
627 .Pp
628 There are currently two MIB related variables that have per-jail settings.
629 Changes to these variables by a jailed process do not effect the host
630 environment, only the jail environment.
631 The variables are
632 .Va kern.securelevel
633 and
634 .Va kern.hostname .
635 .Sh SEE ALSO
636 .Xr killall 1 ,
637 .Xr lsvfs 1 ,
638 .Xr newaliases 1 ,
639 .Xr pgrep 1 ,
640 .Xr pkill 1 ,
641 .Xr ps 1 ,
642 .Xr quota 1 ,
643 .Xr chroot 2 ,
644 .Xr jail 2 ,
645 .Xr jail_attach 2 ,
646 .Xr procfs 5 ,
647 .Xr rc.conf 5 ,
648 .Xr sysctl.conf 5 ,
649 .Xr devfs 8 ,
650 .Xr halt 8 ,
651 .Xr inetd 8 ,
652 .Xr jexec 8 ,
653 .Xr jls 8 ,
654 .Xr mount 8 ,
655 .Xr named 8 ,
656 .Xr reboot 8 ,
657 .Xr rpcbind 8 ,
658 .Xr sendmail 8 ,
659 .Xr shutdown 8 ,
660 .Xr sysctl 8 ,
661 .Xr syslogd 8 ,
662 .Xr umount 8
663 .Sh HISTORY
664 The
665 .Nm
666 utility appeared in
667 .Fx 4.0 .
668 .Sh AUTHORS
669 .An -nosplit
670 The jail feature was written by
671 .An Poul-Henning Kamp
672 for R&D Associates
673 .Pa http://www.rndassociates.com/
674 who contributed it to
675 .Fx .
676 .Pp
677 .An Robert Watson
678 wrote the extended documentation, found a few bugs, added
679 a few new features, and cleaned up the userland jail environment.
680 .Pp
681 .An Bjoern A. Zeeb
682 added multi-IP jail support for IPv4 and IPv6 based on a patch
683 originally done by
684 .An Pawel Jakub Dawidek
685 for IPv4.
686 .Sh BUGS
687 Jail currently lacks the ability to allow access to
688 specific jail information via
689 .Xr ps 1
690 as opposed to
691 .Xr procfs 5 .
692 Similarly, it might be a good idea to add an
693 address alias flag such that daemons listening on all IPs
694 .Pq Dv INADDR_ANY
695 will not bind on that address, which would facilitate building a safe
696 host environment such that host daemons do not impose on services offered
697 from within jails.
698 Currently, the simplest answer is to minimize services
699 offered on the host, possibly limiting it to services offered from
700 .Xr inetd 8
701 which is easily configurable.
702 .Pp
703 At the moment it is possible for a superuser inside a
704 .Nm
705 to modify the root
706 .Xr cpuset 2
707 of that jail.