FreeBSD src
Go to file
Christian S.J. Peron 31c88a3043 Add the ability to associate ipfw rules with a specific prison ID.
Since the only thing truly unique about a prison is it's ID, I figured
this would be the most granular way of handling this.

This commit makes the following changes:

- Adds tokenizing and parsing for the ``jail'' command line option
  to the ipfw(8) userspace utility.
- Append the ipfw opcode list with O_JAIL.
- While Iam here, add a comment informing others that if they
  want to add additional opcodes, they should append them to the end
  of the list to avoid ABI breakage.
- Add ``fw_prid'' to the ipfw ucred cache structure.
- When initializing ucred cache, if the process is jailed,
  set fw_prid to the prison ID, otherwise set it to -1.
- Update man page to reflect these changes.

This change was a strong motivator behind the ucred caching
mechanism in ipfw.

A sample usage of this new functionality could be:

    ipfw add count ip from any to any jail 2

It should be noted that because ucred based constraints
are only implemented for TCP and UDP packets, the same
applies for jail associations.

Conceptual head nod by:	pjd
Reviewed by:	rwatson
Approved by:	bmilekic (mentor)
2004-08-12 22:06:55 +00:00
bin Change the behaviour of `-v' so that, e.g., stepping a month back 2004-08-09 13:43:39 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r133594, 2004-08-12 19:17:29 +00:00
crypto Regenerate. 2004-04-20 09:49:37 +00:00
etc Fix the startup logic for sendmail. If sendmail_enable=yes, don't start 2004-08-05 03:09:54 +00:00
games Include <stdlib.h> for exit(), use prototypes and bump WARNS to 6. 2004-08-01 18:52:40 +00:00
gnu Consolidate libiberty files in one place and avoid listing some 2004-08-12 16:36:52 +00:00
include Sort in dictionary order. 2004-08-12 12:36:04 +00:00
kerberos5 Join the 21st century: Cryptography is no longer an optional component 2004-08-06 07:27:08 +00:00
lib Fix example. 2004-08-12 12:32:14 +00:00
libexec Join the 21st century: Cryptography is no longer an optional component 2004-08-06 07:27:08 +00:00
release clarify that both ECC and non-ECC DIMMS work on 164SX. 2004-08-12 12:42:03 +00:00
rescue Remove dangling raidctl reference 2004-03-16 13:42:23 +00:00
sbin Add the ability to associate ipfw rules with a specific prison ID. 2004-08-12 22:06:55 +00:00
secure Join the 21st century: Cryptography is no longer an optional component 2004-08-06 07:27:08 +00:00
share Be explicit that a driver may assume softc is preserved when returning 0 2004-08-11 21:52:31 +00:00
sys Add the ability to associate ipfw rules with a specific prison ID. 2004-08-12 22:06:55 +00:00
tools Now that make more correctly handles variable assignments 2004-08-12 19:14:10 +00:00
usr.bin Put variable assignments on .MAKEFLAGS and .MFLAGS targets into 2004-08-12 11:49:55 +00:00
usr.sbin Don't put DEBUG to CFLAGS, we have the standard DEBUG_FLAGS for this. 2004-08-12 20:06:01 +00:00
COPYRIGHT Update the COPYRIGHT file to include FreeBSD's compilation copyright 2003-12-31 22:35:22 +00:00
installworld_newk Commit the first set of files for changing time_t on freebsd/sparc64 2004-03-03 19:36:20 +00:00
installworld_oldk Commit the first set of files for changing time_t on freebsd/sparc64 2004-03-03 19:36:20 +00:00
MAINTAINERS Fix spelling. 2004-08-05 21:01:27 +00:00
Makefile Make make recurse into sub-directories and sub-makes when given 2004-08-09 11:38:41 +00:00
Makefile.inc1 Ensure that a new gensnmptree is built. This should fix the problems 2004-08-11 16:45:20 +00:00
README KerberosIV de-orbit burn continues. Disconnect from "make world". 2003-03-08 10:01:26 +00:00
UPDATING Spell check the 20040806 entry. 2004-08-12 06:25:05 +00:00
UPDATING.64BTT Add a tip for people who are using database-related ports on a sparc64 2004-03-17 01:59:47 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html