Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC

and used in a large number of files, but also because an increasing number
of incorrect uses of MAC calls were sneaking in due to copy-and-paste of
MAC-aware code without the associated opt_mac.h include.

Discussed with:	pjd
This commit is contained in:
Robert Watson 2009-06-05 14:55:22 +00:00
parent 88a9a9a61c
commit bcf11e8d00
94 changed files with 6 additions and 115 deletions

View File

@ -30,7 +30,6 @@
__FBSDID("$FreeBSD$");
#include "opt_compat.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -40,7 +40,6 @@
__FBSDID("$FreeBSD$");
#include "opt_compat.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -31,7 +31,6 @@
__FBSDID("$FreeBSD$");
#include "opt_compat.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/blist.h>

View File

@ -30,7 +30,6 @@
__FBSDID("$FreeBSD$");
#include "opt_compat.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/dirent.h>

View File

@ -32,8 +32,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/file.h>

View File

@ -35,8 +35,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/dirent.h>

View File

@ -112,7 +112,7 @@ KSTACK_PAGES
KTRACE
KTRACE_REQUEST_POOL opt_ktrace.h
LIBICONV
MAC
MAC opt_global.h
MAC_BIBA opt_dontuse.h
MAC_BSDEXTENDED opt_dontuse.h
MAC_IFOFF opt_dontuse.h

View File

@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
#endif
#ifdef __FreeBSD__
#include "opt_mac.h"
#include "opt_bpf.h"
#include "opt_pf.h"

View File

@ -28,8 +28,6 @@
* $FreeBSD$
*/
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>

View File

@ -34,8 +34,6 @@
* $FreeBSD$
*/
#include "opt_mac.h" /* To set MNT_MULTILABEL. */
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>

View File

@ -40,8 +40,6 @@
* mkdir: want it ?
*/
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>

View File

@ -42,6 +42,8 @@ __FBSDID("$FreeBSD$");
#include <rpc/rpc.h>
#include <rpc/rpcsec_gss.h>
#include <security/mac/mac_framework.h>
NFSDLOCKMUTEX;
/*

View File

@ -52,9 +52,7 @@
#include <sys/stat.h>
#include <sys/resourcevar.h>
#ifdef MAC
#include <sys/mac.h>
#endif
#include <security/mac/mac_framework.h>
#include <vm/uma.h>

View File

@ -33,7 +33,6 @@
__FBSDID("$FreeBSD$");
#include "opt_kstack_pages.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -55,8 +55,6 @@ __FBSDID("$FreeBSD$");
* IBCS2 system calls that are implemented differently in BSD are
* handled here.
*/
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/dirent.h>

View File

@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
#include "opt_ddb.h"
#include "opt_init_path.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/kernel.h>

View File

@ -70,8 +70,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/acct.h>

View File

@ -27,8 +27,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>

View File

@ -37,8 +37,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include <sys/types.h>
#include <sys/param.h>
#include <sys/proc.h>

View File

@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$");
#include "opt_hwpmc_hooks.h"
#include "opt_kdtrace.h"
#include "opt_ktrace.h"
#include "opt_mac.h"
#include "opt_vm.h"
#include <sys/param.h>

View File

@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$");
#include "opt_compat.h"
#include "opt_kdtrace.h"
#include "opt_ktrace.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
#include "opt_kdtrace.h"
#include "opt_ktrace.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$");
#include "opt_ddb.h"
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/types.h>

View File

@ -35,7 +35,6 @@
__FBSDID("$FreeBSD$");
#include "opt_ktrace.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$");
#include "opt_ddb.h"
#include "opt_hwpmc_hooks.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/kernel.h>

View File

@ -28,7 +28,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include "opt_param.h"
#include <sys/param.h>

View File

@ -29,7 +29,6 @@
*/
#include "opt_kdtrace.h"
#include "opt_mac.h"
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");

View File

@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$");
#include "opt_compat.h"
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
#include "opt_ddb.h"
#include "opt_kdb.h"
#include "opt_mac.h"
#include "opt_panic.h"
#include "opt_show_busybufs.h"
#include "opt_sched.h"

View File

@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$");
#include "opt_compat.h"
#include "opt_ktrace.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$");
#include "opt_ddb.h"
#include "opt_gdb.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -29,7 +29,6 @@
__FBSDID("$FreeBSD$");
#include "opt_ddb.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -45,7 +45,6 @@
__FBSDID("$FreeBSD$");
#include "opt_ktrace.h"
#include "opt_mac.h"
#ifdef __i386__
#include "opt_npx.h"
#endif

View File

@ -91,8 +91,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/fcntl.h>

View File

@ -32,8 +32,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/file.h>

View File

@ -51,7 +51,6 @@
__FBSDID("$FreeBSD$");
#include "opt_sysvipc.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -40,7 +40,6 @@
__FBSDID("$FreeBSD$");
#include "opt_sysvipc.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$");
#include "opt_compat.h"
#include "opt_sysvipc.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -32,7 +32,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include "opt_param.h"
#include "opt_mbuf_stress_test.h"
#include "opt_mbuf_profiling.h"

View File

@ -65,8 +65,6 @@ __FBSDID("$FreeBSD$");
/*#define PULLDOWN_DEBUG*/
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>

View File

@ -34,7 +34,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include "opt_posix.h"
#include <sys/param.h>

View File

@ -55,8 +55,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/fcntl.h>
#include <sys/file.h>

View File

@ -99,7 +99,6 @@ __FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_mac.h"
#include "opt_zero.h"
#include "opt_compat.h"

View File

@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$");
#include "opt_sctp.h"
#include "opt_compat.h"
#include "opt_ktrace.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -59,7 +59,6 @@
__FBSDID("$FreeBSD$");
#include "opt_ddb.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/domain.h>

View File

@ -35,8 +35,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>

View File

@ -29,8 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/lock.h>

View File

@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
#include "opt_kdtrace.h"
#include "opt_ktrace.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -68,7 +68,6 @@ __FBSDID("$FreeBSD$");
#include <security/mac/mac_framework.h>
#include "opt_rootdevname.h"
#include "opt_mac.h"
#define ROOTNAME "root_device"
#define VFS_MOUNTARG_SIZE_MAX (1024 * 64)

View File

@ -42,7 +42,6 @@
__FBSDID("$FreeBSD$");
#include "opt_ddb.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$");
#include "opt_compat.h"
#include "opt_kdtrace.h"
#include "opt_ktrace.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -37,8 +37,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/fcntl.h>

View File

@ -38,7 +38,6 @@
__FBSDID("$FreeBSD$");
#include "opt_bpf.h"
#include "opt_mac.h"
#include "opt_netgraph.h"
#include <sys/types.h>

View File

@ -34,7 +34,6 @@
#include "opt_inet6.h"
#include "opt_inet.h"
#include "opt_route.h"
#include "opt_mac.h"
#include "opt_carp.h"
#include <sys/param.h>

View File

@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_mac.h"
#include "opt_natm.h"
#include <sys/param.h>

View File

@ -35,7 +35,6 @@
#include "opt_inet6.h"
#include "opt_ipx.h"
#include "opt_route.h"
#include "opt_mac.h"
#include "opt_netgraph.h"
#include "opt_carp.h"
#include "opt_mbuf_profiling.h"

View File

@ -40,7 +40,6 @@
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipx.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -32,7 +32,6 @@
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -32,7 +32,6 @@
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -43,7 +43,6 @@
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipx.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -39,7 +39,6 @@
#include "opt_inet6.h"
#include "opt_ipx.h"
#include "opt_route.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -76,7 +76,6 @@
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -20,7 +20,6 @@
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipx.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/priv.h>

View File

@ -51,7 +51,6 @@
*/
#include "opt_atalk.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -49,8 +49,6 @@
* $FreeBSD$
*/
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/lock.h>

View File

@ -23,8 +23,6 @@
/* $FreeBSD$ */
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mbuf.h>

View File

@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_route.h"
#include "opt_mac.h"
#include "opt_carp.h"
#include <sys/param.h>

View File

@ -50,7 +50,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include "opt_route.h"
#include <sys/param.h>

View File

@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$");
#include "opt_ddb.h"
#include "opt_ipsec.h"
#include "opt_inet6.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$");
#if !defined(KLD_MODULE)
#include "opt_inet.h"
#include "opt_ipfw.h"
#include "opt_mac.h"
#include "opt_sctp.h"
#ifndef INET
#error "IPDIVERT requires INET."

View File

@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$");
#endif
#include "opt_inet6.h"
#include "opt_ipsec.h"
#include "opt_mac.h"
#include "opt_route.h"
#include <sys/param.h>

View File

@ -33,7 +33,6 @@
__FBSDID("$FreeBSD$");
#include "opt_ipsec.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$");
#include "opt_ipstealth.h"
#include "opt_ipsec.h"
#include "opt_route.h"
#include "opt_mac.h"
#include "opt_carp.h"
#include <sys/param.h>

View File

@ -70,7 +70,6 @@
__FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_mac.h"
#include "opt_mrouting.h"
#define _PIM_VT 1

View File

@ -33,7 +33,6 @@
__FBSDID("$FreeBSD$");
#include "opt_ipstealth.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$");
#include "opt_ipfw.h"
#include "opt_ipsec.h"
#include "opt_route.h"
#include "opt_mac.h"
#include "opt_mbuf_stress_test.h"
#include "opt_mpath.h"
#include "opt_sctp.h"

View File

@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$");
#include "opt_inet6.h"
#include "opt_ipsec.h"
#include "opt_route.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/jail.h>

View File

@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
#include "opt_mac.h"
#include "opt_tcpdebug.h"
#include <sys/param.h>

View File

@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
#include "opt_mac.h"
#include "opt_tcpdebug.h"
#include <sys/param.h>

View File

@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
#include "opt_mac.h"
#include "opt_tcpdebug.h"
#include <sys/param.h>

View File

@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_mac.h"
#include "opt_tcpdebug.h"
#include <sys/param.h>

View File

@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$");
#include "opt_ipfw.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/domain.h>

View File

@ -32,8 +32,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>

View File

@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_mac.h"
#include "opt_route.h"
#include <sys/param.h>

View File

@ -68,7 +68,6 @@ __FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/jail.h>

View File

@ -81,6 +81,8 @@ __FBSDID("$FreeBSD$");
#include <nfsserver/nfsrvcache.h>
#include <nfsserver/nfs_fha.h>
#include <security/mac/mac_framework.h>
#ifndef NFS_LEGACYRPC
static MALLOC_DEFINE(M_NFSSVC, "nfss_srvsock", "Nfs server structure");

View File

@ -39,8 +39,6 @@ __FBSDID("$FreeBSD$");
* Socket operations for use by nfs
*/
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/jail.h>

View File

@ -30,8 +30,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/namei.h>

View File

@ -32,7 +32,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include "opt_quota.h"
#include "opt_ufs.h"
#include "opt_ffs.h"

View File

@ -37,7 +37,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include "opt_quota.h"
#include "opt_suiddir.h"
#include "opt_ufs.h"

View File

@ -69,7 +69,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_mac.h"
#include "opt_swap.h"
#include "opt_vm.h"

View File

@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
#include "opt_compat.h"
#include "opt_hwpmc_hooks.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>