Commit Graph

103 Commits

Author SHA1 Message Date
Mike Barcroft
ebf5d9bc2c o Add jls(8) for listing active jails.
o Add jexec(8) to execute a command in an existing jail.
o Add -j option for killall(1) to kill all processes in a specified
  jail.
o Add -i option to jail(8) to output jail ID of newly created jail.
2003-04-09 03:04:12 +00:00
Maxim Konovalov
0389572f96 Free login_cap(3) resources after usage.
Submitted by:	demon
2003-04-07 10:16:37 +00:00
Maxim Konovalov
b026ec0eb8 o Fix error messages formatting, style.
Prodded by:	bde
Reviewed by:	bde
2003-04-02 09:20:08 +00:00
Maxim Konovalov
d6131f4b8e 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
2003-03-27 12:16:58 +00:00
Maxim Konovalov
3b8a7d4f4f portmap_enable -> rpcbind_enable.
Spotted by:	Andrew Khlebutin <andreyh@perm.ru>
2003-03-18 14:01:02 +00:00
Giorgos Keramidas
35adbc4d5c Remove traces of MAKEDEV & add xref to mount_devfs(8).
DEVFS is now mandatory in CURRENT.

PR:		docs/48095
Submitted by:	Grzegorz Czaplinski <G.Czaplinski@prioris.mini.pw.edu.pl>
2003-02-28 22:47:18 +00:00
Poul-Henning Kamp
c0dc344665 Fix example, we do not need NO_MAKEDEV_RUN any more.
XXX: this example should be updated with a good example of devfs(8) rules.
2002-10-22 15:03:51 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Dima Dorfman
a0cfa93972 Fix IP address typo.
PR:		38313
Submitted by:	Jeff Ito <jeffi@rcn.com>
2002-05-20 07:29:25 +00:00
Dag-Erling Smørgrav
d397408818 Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.
2002-04-22 13:44:47 +00:00
Andrew R. Reiter
d0615c64a5 - Attempt to help declutter kern. sysctl by moving security out from
beneath it.

Reviewed by: rwatson
2002-01-16 06:55:30 +00:00
Ruslan Ermilov
fe9a332ddf mdoc(7) police: ispell rev. 1.32. 2002-01-10 15:15:44 +00:00
Ruslan Ermilov
3551a1c577 mdoc(7) police: tidy up previous delta. 2002-01-10 15:14:22 +00:00
Poul-Henning Kamp
c579474cea Add some wisdom to the jail setup instructions. 2001-12-14 20:20:50 +00:00
Ruslan Ermilov
1a6ec3e8a3 mdoc(7) police overhaul. 2001-12-14 10:18:15 +00:00
Andrew R. Reiter
94b3b598b9 - Update the sysctl mibs in order to reflect the recent kern_jail.c
changes.

Approved by:	rwatson
Reviewed by:	rwatson
2001-12-12 05:24:50 +00:00
Dima Dorfman
979d474a6d syslogd can now be configured to bind to a specific address. 2001-09-03 15:42:10 +00:00
Dima Dorfman
4b526751b5 This is not jail(2), or anything else suitable to be referenced with .Fn. 2001-08-27 12:15:44 +00:00
David E. O'Brien
90e655ea4e 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.
2001-07-20 06:20:32 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Ruslan Ermilov
a4c37c816b mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 15:12:08 +00:00
Ruslan Ermilov
e287e9b188 mdoc(7) police: sort xrefs. 2001-07-05 08:13:03 +00:00
Dima Dorfman
f6751868e4 Set WARNS=2 on programs that compile cleanly with it; add $FreeBSD$
where necessary.

Submitted by:	Mike Barcroft <mike@q9media.com>
2001-06-30 05:39:36 +00:00
Dima Dorfman
3876038a6f Add missing includes and sort includes. 2001-06-24 20:28:19 +00:00
Dima Dorfman
2694efd413 Include missing header files which define functions for which gcc has
builtints (e.g., exit, strcmp).
2001-06-24 20:25:23 +00:00
Maxim Sobolev
8657581bfd Correct cross-reference:
portmap.8 --> rpcbind.8

Submitted by:	.Xr testing script
2001-06-07 16:59:19 +00:00
Jeroen Ruigrok van der Werven
723f7e3025 Change NO_MAKEDEV to a finer granularity method:
NO_MAKEDEV_INSTALL and NO_MAKEDEV_RUN.  The former implying the latter.
The names imply what they do.  The last commit by DES based on a PR defeated
the original idea behind NO_MAKEDEV, which was not to run MAKEDEV, but to do
the installation of MAKEDEV.  This should satisfy both parties on the MAKEDEV
challenge.
Reflect this in the documentation.
2001-03-29 14:03:29 +00:00
Ruslan Ermilov
345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov
c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Robert Watson
9a67c2cd11 o Replace part-wise instructions for building world for jail(8) with
a simple make world; while this does a bit more work, it means that
  jail(8) doesn't have to be kept in sync with /usr/src/Makefile{,.inc1}
  which is a moving target.  MFC candidate.

Submitted by:	FUJISHIMA Satsuki <sf@FreeBSD.org>
Reviewed by:	phk
Also pointed out by:	Phil Kernick <Phil@Kernick.org>
2001-03-11 20:37:11 +00:00
Ruslan Ermilov
610a5778c5 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:44:04 +00:00
Ruslan Ermilov
ed40311694 mdoc(7) police: removed history info from the .Os FreeBSD call. 2000-12-14 11:52:05 +00:00
Ruslan Ermilov
e97407b4f2 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
Ruslan Ermilov
b5c508fba3 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
Sheldon Hearn
12d1ad83de Whitespace only: Correct poor line-breaking introduced in rev 1.17,
which was limited to correcting mark-up.
2000-11-01 07:51:14 +00:00
Sheldon Hearn
88a2f8f5e9 Correct mark-up used in rev 1.16, as discussed with its contributor:
* Use a sub-section (Ss) instead of a section (Sh) for
  "Sysctl MIB Entries".

* Use a tagged list (Bl, El and It) instead of sub-sections (Ss) for
  the actual MIB entries.

* Mark paths up as such (Pa).

* Mark defined values up as such (Dv).
2000-11-01 07:49:29 +00:00
Robert Watson
98965adac8 o Document various sysctl's available for managing services available
within jail()
2000-10-31 01:47:59 +00:00
Daniel Harris
00f1e9626b Typo: "is unreliably by default" to "is unreliable by default".
PR:		19411
Submitted by:	Benno Rice <benno@netizen.com.au>
2000-07-08 14:12:34 +00:00
Mike Pritchard
69bd852dd0 Some minor mdoc style and spelling fixes. 2000-03-24 02:05:54 +00:00
Sheldon Hearn
f2e366a105 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 14:09:25 +00:00
Robert Watson
d98722bcb9 - As jail(8) has been almost completely rewritten, prepend another copyright/
BSD-style license, as an add-on to phk's beerware license.  Please fedex
  some beer to phk.

- Add a ``make depend'' line to the jail-building, which fixes openssl,
  among other things.  Suggested by: kris

- Add ``newaliases'' to the list of things to do when setting up a new
  jail, so that the jailed sendmail doesn't complain.

- Correct references to ``kern.jail.set_hostname_allowed'' which now read
  ``jail.set_hostname_allowed''.

- Add a reference to sysctl.conf where the sysctl can easily be set in
  a persistent way.

- Add a list of cross references to the man page.

- Fix a formatting nit or two.
2000-02-20 02:51:11 +00:00
Robert Watson
c2edcb1a5c Fix up a few documentation nits in jail(8), as well as improve the
instructions so as to reduce warnings during jail startup, etc.
Add a somewhat bolder warning recommending the use of
kern.jail.set_hostname to limit jail renamining.
2000-02-18 19:02:22 +00:00
Robert Watson
09aa405f34 Modified jail.8 to correct a typo (inetd_flas vs. inetd_flags), and add
a comment to the effect that I'm responsible for the additional
documentation, et al, so that phk gets fewer messages about my errors.
2000-02-16 23:50:43 +00:00
Chris Costello
05181f633f Add Robert Watson's much extended documentation including that of the
kern.jail.set_hostname_allowed sysctl MIB.

Submitted by:	rwatson
2000-02-13 05:15:29 +00:00
Robert Watson
34d226d7ff Clean up the jail(8) documentation so that it suggests building a jail
userland in a safer way.  Using the NO_MAKEDEV argument in make
distribution prevents the creation of a number of unsafe device nodes
in the jailed /dev, including disk devices, and more.  This depends
on an earlier commit to /etc/Makefile to provide the NO_MAKEDEV
support.

Approved by:	jkh
2000-02-09 04:17:41 +00:00
Jeroen Ruigrok van der Werven
5e4614fe95 Properly manify this manpage. 1999-12-21 11:25:10 +00:00
Poul-Henning Kamp
ad1720d30c A procfs mount is no longer needed for a jail. 1999-12-05 09:28:59 +00:00
Poul-Henning Kamp
7248ef86e0 Add a version number field to the jail(2) argument so that future changes
can be handled intelligently.

WARNING:  you will need to reinstall #includes and recompile jail(8).
1999-09-19 08:36:37 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Poul-Henning Kamp
df99b42329 Add example of how to create a jail. 1999-07-09 21:35:50 +00:00
Poul-Henning Kamp
c020621f03 Various cosmetics.
Submitted by:	Rudolf Cejka <cejkar@dcse.fee.vutbr.cz>
Reviewed by:	phk
1999-05-05 19:23:45 +00:00
Poul-Henning Kamp
ce5c1cd1ff Fix various bogons.
Submitted by:	Rudolf Cejka <cejkar@dcse.fee.vutbr.cz>
Reviewed by:	phk
1999-05-04 18:20:53 +00:00
Poul-Henning Kamp
75c1354190 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/
1999-04-28 11:38:52 +00:00