freebsd with flexible iflib nic queues
Go to file
Robert Watson 9ca435893b In order to better support flexible and extensible access control,
make a series of modifications to the credential arguments relating
to file read and write operations to cliarfy which credential is
used for what:

- Change fo_read() and fo_write() to accept "active_cred" instead of
  "cred", and change the semantics of consumers of fo_read() and
  fo_write() to pass the active credential of the thread requesting
  an operation rather than the cached file cred.  The cached file
  cred is still available in fo_read() and fo_write() consumers
  via fp->f_cred.  These changes largely in sys_generic.c.

For each implementation of fo_read() and fo_write(), update cred
usage to reflect this change and maintain current semantics:

- badfo_readwrite() unchanged
- kqueue_read/write() unchanged
  pipe_read/write() now authorize MAC using active_cred rather
  than td->td_ucred
- soo_read/write() unchanged
- vn_read/write() now authorize MAC using active_cred but
  VOP_READ/WRITE() with fp->f_cred

Modify vn_rdwr() to accept two credential arguments instead of a
single credential: active_cred and file_cred.  Use active_cred
for MAC authorization, and select a credential for use in
VOP_READ/WRITE() based on whether file_cred is NULL or not.  If
file_cred is provided, authorize the VOP using that cred,
otherwise the active credential, matching current semantics.

Modify current vn_rdwr() consumers to pass a file_cred if used
in the context of a struct file, and to always pass active_cred.
When vn_rdwr() is used without a file_cred, pass NOCRED.

These changes should maintain current semantics for read/write,
but avoid a redundant passing of fp->f_cred, as well as making
it more clear what the origin of each credential is in file
descriptor read/write operations.

Follow-up commits will make similar changes to other file descriptor
operations, and modify the MAC framework to pass both credentials
to MAC policy modules so they can implement either semantic for
revocation.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-15 20:55:08 +00:00
bin o Backout rev. 1.40 and rev. 1.49. 2002-08-15 14:53:20 +00:00
contrib Merge gcc.295/cccp.c,v 1.9: don't let gcc(1) hide warnings in system headers. 2002-08-15 08:45:49 +00:00
crypto Resolve conflicts. 2002-08-10 01:50:50 +00:00
etc I missed the single_mountd_enable in rc.network. 2002-08-15 03:29:19 +00:00
games Fix typos (s/seperat/separat/ et al); add FreeBSD ID. 2002-08-12 10:04:32 +00:00
gnu Removed the (never-released) FreeBSD 4.6.1. 2002-08-14 16:57:14 +00:00
include - For compliance with IEEE Std 1003.1-2001, add the 'restrict' 2002-08-15 10:28:52 +00:00
kerberos5 Bootstrapping aid for pre-getprogname(3) systems. 2002-08-13 16:52:52 +00:00
kerberosIV Drop support for COPY, -c has been the default mode of install(1) 2002-07-29 09:40:17 +00:00
lib Put each function argument on its own line to keep lines shorter 2002-08-15 20:33:44 +00:00
libexec mdoc(7) police: Removed redundant .Ns calls. 2002-08-13 16:07:28 +00:00
release Collapsed the export list, added CD_EXTRA_BITS to it. 2002-08-14 16:50:50 +00:00
sbin Don't depend on namespace pollution in sys/mount.h and 2002-08-13 16:07:39 +00:00
secure Update list of installed manual pages after regenerating them. 2002-07-30 14:47:24 +00:00
share Fix typo. 2002-08-15 13:11:35 +00:00
sys In order to better support flexible and extensible access control, 2002-08-15 20:55:08 +00:00
tools Add regression tests for sysvipc. 2002-08-15 06:34:37 +00:00
usr.bin Oops, add -false to the operators list in the manual page for find(1), as added 2002-08-15 18:30:13 +00:00
usr.sbin mdoc(7) police: Removed redundant .Ns calls. 2002-08-13 16:07:28 +00:00
COPYRIGHT
MAINTAINERS Added groff(1) and natd(8) entries. 2002-07-18 12:12:15 +00:00
Makefile Indentation. 2002-07-20 10:01:00 +00:00
Makefile.inc1 The intent in rev. 1.299 was to make the CPUTYPE assignment type check 2002-08-08 15:43:23 +00:00
Makefile.upgrade Removed "env" commands. "sh" is a real shell, so 2002-03-19 05:58:36 +00:00
README Fix broken handbook links. 2002-07-21 16:45:30 +00:00
UPDATING Document the effect of contrib/gcc/c-lex.c,v 1.2 commit. 2002-08-15 08:51:24 +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.

kerberosIV	KerberosIV (eBones) 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