FreeBSD src
Go to file
Christian S.J. Peron f0cbfcc468 Fix the handling of IPv6 addresses for subject and process BSM audit
tokens. Currently, we do not support the set{get}audit_addr(2) system
calls which allows processes like sshd to set extended or ip6
information for subject tokens.

The approach that was taken was to change the process audit state
slightly to use an extended terminal ID in the kernel. This allows
us to store both IPv4 IPv6 addresses. In the case that an IPv4 address
is in use, we convert the terminal ID from an struct auditinfo_addr to
a struct auditinfo.

If getaudit(2) is called when the subject is bound to an ip6 address,
we return E2BIG.

- Change the internal audit record to store an extended terminal ID
- Introduce ARG_TERMID_ADDR
- Change the kaudit <-> BSM conversion process so that we are using
  the appropriate subject token. If the address associated with the
  subject is IPv4, we use the standard subject32 token. If the subject
  has an IPv6 address associated with them, we use an extended subject32
  token.
- Fix a couple of endian issues where we do a couple of byte swaps when
  we shouldn't be. IP addresses are already in the correct byte order,
  so reading the ip6 address 4 bytes at a time and swapping them results
  in in-correct address data. It should be noted that the same issue was
  found in the openbsm library and it has been changed there too on the
  vendor branch
- Change A_GETPINFO to use the appropriate structures
- Implement A_GETPINFO_ADDR which basically does what A_GETPINFO does,
  but can also handle ip6 addresses
- Adjust get{set}audit(2) syscalls to convert the data
  auditinfo <-> auditinfo_addr
- Fully implement set{get}audit_addr(2)

NOTE: This adds the ability for processes to correctly set extended subject
information. The appropriate userspace utilities still need to be updated.

MFC after:	1 month
Reviewed by:	rwatson
Obtained from:	TrustedBSD
2007-04-13 14:55:19 +00:00
bin Move uuidgen(1) from /usr/bin/ to /bin/. It will be used in rc.d/hostid 2007-04-09 19:16:48 +00:00
cddl MFp4: Synchronize with vendor (mostly 'zfs rename -r'). 2007-04-12 23:16:02 +00:00
compat/opensolaris Please welcome ZFS - The last word in file systems. 2007-04-06 01:09:06 +00:00
contrib MFp4: Synchronize with vendor (mostly 'zfs rename -r'). 2007-04-12 23:16:02 +00:00
crypto - Bring upgrade produce up-to-date for OpenSSL 0.9.8e. 2007-03-15 21:06:48 +00:00
etc - Create an empty /etc/zfs/exports file when zfs_enable="YES" and we don't 2007-04-13 11:02:06 +00:00
games Line wrap previous entry 2007-03-30 04:31:53 +00:00
gnu Minor Makefile cleanup. Do not use Makefile variables named 'version' and 2007-03-12 00:28:06 +00:00
include Install only types.h from sys/rpc/. 2007-04-13 01:39:33 +00:00
kerberos5 Kerberos/Heimdal doesn't really depend on the INET6 macro. 2006-07-28 06:33:27 +00:00
lib Fix a bug in the description of the "p6-div" event. [1] 2007-04-12 09:16:54 +00:00
libexec Bring rtld exports in line with corresponding symbols exported from 2007-04-09 23:00:29 +00:00
release Modified release note: Reword sg note to make more sense. 2007-04-11 17:45:37 +00:00
rescue Replace the GNU gzip with a slightly modified NetBSD gzip. The 2007-01-26 10:19:08 +00:00
sbin Bump document date for new trunk commands. 2007-04-10 03:35:42 +00:00
secure Upgrade to OpenSSL 0.9.8e. 2007-03-15 20:15:15 +00:00
share Pav and marcus co-mentored me for a few weeks while adamw was busy in school 2007-04-13 14:29:38 +00:00
sys Fix the handling of IPv6 addresses for subject and process BSM audit 2007-04-13 14:55:19 +00:00
tools Nuke ipblock. A more complete multicast regression test suite is on the way. 2007-04-12 11:46:30 +00:00
usr.bin In .error and .warning, prefer command-line variables 2007-04-12 18:14:00 +00:00
usr.sbin Fatal error is only when cannot open any of the given exports files. 2007-04-13 10:25:49 +00:00
COPYRIGHT Welcome to 2007 2006-12-31 16:35:29 +00:00
LOCKS Document commit constraints for RELENG_6_*. 2006-01-13 06:51:43 +00:00
MAINTAINERS Claim maintainership of ZFS. 2007-04-06 10:57:15 +00:00
Makefile Introduce a variable TARGETS that can be set on the make command line 2007-04-02 21:32:44 +00:00
Makefile.inc1 Connect ZFS to the build. 2007-04-06 02:13:30 +00:00
ObsoleteFiles.inc Move uuidgen(1) from /usr/bin/ to /bin/. It will be used in rc.d/hostid 2007-04-09 19:16:48 +00:00
README Simply running ``make world'' will bomb unless you dig up the 2006-06-07 03:33:48 +00:00
UPDATING Make the tunable names for Intel license agreement more obvious. 2007-04-03 10:04:54 +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 ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

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.

rescue		Build system for statically linked /rescue utilities.

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