Move to a nested include of _label.h instead of mac.h in sys/sys/*.h

(Most of the places where mac.h was recursively included from another
kernel header file.  net/netinet to follow.)

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
Suggested by:	bde
This commit is contained in:
rwatson 2002-08-14 01:04:43 +00:00
parent f5d2a2635e
commit 20c1b55c0b
6 changed files with 8 additions and 14 deletions

View File

@ -37,11 +37,7 @@
#ifndef _SYS_MBUF_H_
#define _SYS_MBUF_H_
/*
* XXXMAC: Possibly this recursive include is a bad idea, but a lot
* of code exists that assumes it is sufficient to include just mbuf.h
*/
#include <sys/mac.h>
#include <sys/_label.h>
/*
* Mbufs are of a single size, MSIZE (machine/param.h), which

View File

@ -43,10 +43,10 @@
*/
#include <sys/lockmgr.h>
#include <sys/mac.h>
#include <sys/ucred.h>
#include <sys/queue.h>
#ifdef _KERNEL
#include <sys/_label.h>
#include <sys/_lock.h>
#include <sys/_mutex.h>
#endif

View File

@ -28,7 +28,7 @@
#include <sys/time.h> /* for struct timespec */
#include <sys/selinfo.h> /* for struct selinfo */
#include <vm/vm.h> /* for vm_page_t */
#include <sys/mac.h> /* for struct label */
#include <sys/_label.h> /* for struct label */
#include <machine/param.h> /* for PAGE_SIZE */
#endif

View File

@ -37,7 +37,7 @@
#ifndef _SYS_SOCKETVAR_H_
#define _SYS_SOCKETVAR_H_
#include <sys/mac.h> /* for struct label */
#include <sys/_label.h> /* for struct label */
#include <sys/queue.h> /* for TAILQ macros */
#include <sys/selinfo.h> /* for struct selinfo */

View File

@ -38,12 +38,10 @@
#define _SYS_UCRED_H_
/*
* XXXMAC: Recursively include mac.h due to an API assumption that it
* it is sufficient to include types.h and ucred.h to have a defined
* struct ucred. This should be changed so that struct ucred is not
* exported to userland via _KERNEL.
* XXXMAC: this recursive include could be #ifdef _KERNEL if struct
* ucred could also be #ifdef _KERNEL.
*/
#include <sys/mac.h>
#include <sys/_label.h>
/*
* Credentials.

View File

@ -44,12 +44,12 @@
#include <sys/lockmgr.h>
#include <sys/queue.h>
#include <sys/_label.h>
#include <sys/_lock.h>
#include <sys/_mutex.h>
#include <sys/selinfo.h>
#include <sys/uio.h>
#include <sys/acl.h>
#include <sys/mac.h>
#include <vm/uma.h>
/*