freebsd-skq/sys/conf
Robert Watson 800c940832 Add a new priv(9) kernel interface for checking the availability of
privilege for threads and credentials.  Unlike the existing suser(9)
interface, priv(9) exposes a named privilege identifier to the privilege
checking code, allowing more complex policies regarding the granting of
privilege to be expressed.  Two interfaces are provided, replacing the
existing suser(9) interface:

suser(td)                 ->   priv_check(td, priv)
suser_cred(cred, flags)   ->   priv_check_cred(cred, priv, flags)

A comprehensive list of currently available kernel privileges may be
found in priv.h.  New privileges are easily added as required, but the
comments on adding privileges found in priv.h and priv(9) should be read
before doing so.

The new privilege interface exposed sufficient information to the
privilege checking routine that it will now be possible for jail to
determine whether a particular privilege is granted in the check routine,
rather than relying on hints from the calling context via the
SUSER_ALLOWJAIL flag.  For now, the flag is maintained, but a new jail
check function, prison_priv_check(), is exposed from kern_jail.c and used
by the privilege check routine to determine if the privilege is permitted
in jail.  As a result, a centralized list of privileges permitted in jail
is now present in kern_jail.c.

The MAC Framework is now also able to instrument privilege checks, both
to deny privileges otherwise granted (mac_priv_check()), and to grant
privileges otherwise denied (mac_priv_grant()), permitting MAC Policy
modules to implement privilege models, as well as control a much broader
range of system behavior in order to constrain processes running with
root privilege.

The suser() and suser_cred() functions remain implemented, now in terms
of priv_check() and the PRIV_ROOT privilege, for use during the transition
and possibly continuing use by third party kernel modules that have not
been updated.  The PRIV_DRIVER privilege exists to allow device drivers to
check privilege without adopting a more specific privilege identifier.

This change does not modify the actual security policy, rather, it
modifies the interface for privilege checks so changes to the security
policy become more feasible.

Sponsored by:		nCircle Network Security, Inc.
Obtained from:		TrustedBSD Project
Discussed on:		arch@
Reviewed (at least in part) by:	mlaier, jmg, pjd, bde, ceri,
			Alex Lyashkov <umka at sevcity dot net>,
			Skip Ford <skip dot ford at verizon dot net>,
			Antoine Brodin <antoine dot brodin at laposte dot net>
2006-11-06 13:37:19 +00:00
..
defines
files Add a new priv(9) kernel interface for checking the availability of 2006-11-06 13:37:19 +00:00
files.amd64 Backout the linux aio stuff. Several problems where identified and the 2006-10-29 14:02:39 +00:00
files.arm Add remote GDB bits for arm. 2006-07-14 00:50:51 +00:00
files.i386 Backout the linux aio stuff. Several problems where identified and the 2006-10-29 14:02:39 +00:00
files.ia64 Move "device splash" back to MI NOTES and "files", it's MI. 2006-10-23 13:23:14 +00:00
files.pc98 Backout the linux aio stuff. Several problems where identified and the 2006-10-29 14:02:39 +00:00
files.powerpc Move MI parts of syscons into MI "files". 2006-10-23 13:05:01 +00:00
files.sparc64 - In sunkbd_probe_keyboard() don't bother to determine the keyboard layout 2006-11-02 00:01:15 +00:00
files.sun4v kernel clean up to make the sun4v kernel build 2006-10-09 04:45:19 +00:00
kern.mk Create new dialect knob, as setting the language dialect isn't a warning flag. 2006-06-29 21:15:25 +00:00
kern.post.mk MF kmod.mk 1.176: Properly handle vnode_if.h dependencies. 2006-10-26 19:04:20 +00:00
kern.pre.mk Fixed high resolution profiling on arches that support it (amd64 and 2006-10-26 15:16:43 +00:00
kmod_syms.awk
kmod.mk Sort MFILES list 2006-10-20 07:31:15 +00:00
ldscript.amd64 Provide the _start_ctors and _stop_ctors symbols. As on i386, the addresses 2004-05-29 01:09:00 +00:00
ldscript.arm Create a non-elf pure binary version of the kernel as well. 2005-11-24 02:25:49 +00:00
ldscript.i386 Align the .ctors section correctly. 2003-12-03 07:40:03 +00:00
ldscript.ia64 Have the linker provide btext. It's used for profiling. 2004-08-25 07:43:28 +00:00
ldscript.powerpc
ldscript.sparc64
Makefile.amd64 Version 600004 is better than 700000 given other changes that are in 2005-11-28 17:51:31 +00:00
Makefile.arm Only use -mno-apcs-frame if DDB is not in the kernel, as it prevent the 2006-07-24 22:09:47 +00:00
Makefile.i386 Set MACHINE to i386(pc98). This fixes cross-building. 2006-01-29 03:32:19 +00:00
Makefile.ia64 Version 600004 is better than 700000 given other changes that are in 2005-11-28 17:51:31 +00:00
Makefile.pc98 Set MACHINE to i386(pc98). This fixes cross-building. 2006-01-29 03:32:19 +00:00
Makefile.powerpc Version 600004 is better than 700000 given other changes that are in 2005-11-28 17:51:31 +00:00
Makefile.sparc64 Version 600004 is better than 700000 given other changes that are in 2005-11-28 17:51:31 +00:00
Makefile.sun4v placate Grim Reaper with sun4v support 2006-10-05 06:14:28 +00:00
makeLINT.mk
makeLINT.sed
newvers.sh Pad the strings sccs[], version[], and osrelease[] up to a minimum of 2005-08-19 01:49:15 +00:00
NOTES Ok, here it is, we finally add SCTP to current. Note that this 2006-11-03 15:23:16 +00:00
options Ok, here it is, we finally add SCTP to current. Note that this 2006-11-03 15:23:16 +00:00
options.amd64 Remove sio(4) and related options from MI files to amd64, i386 2006-07-29 18:38:54 +00:00
options.arm Finally bring it support for the i80219 XScale processor. 2006-08-24 23:51:28 +00:00
options.i386 Remove sio(4) and related options from MI files to amd64, i386 2006-07-29 18:38:54 +00:00
options.ia64 o Move ISA specific code from ppc.c to ppc_isa.c -- a bus front- 2006-04-24 23:31:51 +00:00
options.pc98 Remove sio(4) and related options from MI files to amd64, i386 2006-07-29 18:38:54 +00:00
options.powerpc Catch up with sparc64 OFWCONS_POLL_HZ change 2004-06-25 13:44:34 +00:00
options.sparc64 - In sunkbd_probe_keyboard() don't bother to determine the keyboard layout 2006-11-02 00:01:15 +00:00
options.sun4v placate Grim Reaper with sun4v support 2006-10-05 06:14:28 +00:00
systags.sh Use a simpler way to reach the <machine> include dir, which should 2005-12-03 21:37:54 +00:00