diff options
author | rwatson <rwatson@FreeBSD.org> | 2002-08-13 15:54:28 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2002-08-13 15:54:28 +0000 |
commit | de88edcff7159e77f849f527e0dab3df175df531 (patch) | |
tree | d88713ad751fd4b6851c1e01f2d5a1f385421f52 /sys/security | |
parent | 05cd61a598fe2d392d728d45d06291bbd9a65c0c (diff) | |
download | FreeBSD-src-de88edcff7159e77f849f527e0dab3df175df531.zip FreeBSD-src-de88edcff7159e77f849f527e0dab3df175df531.tar.gz |
Define 'struct label' in _label.h rather than mac.h, which will permit
us to reduce namespace pollution by doing a nested include of _label.h
rather than mac.h. mac.h contains lots of baggage, whereas _label.h
contains much less. A follow-up sweep to change nested inclusion will
follow. The problem regarding exporting 'struct label' to userland
due to excessive exporting of kernel structures to userland still
needs to be resolved.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
Suggested by: bde
Diffstat (limited to 'sys/security')
-rw-r--r-- | sys/security/mac/mac_framework.h | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/sys/security/mac/mac_framework.h b/sys/security/mac/mac_framework.h index 05aa0a9..feb1aea 100644 --- a/sys/security/mac/mac_framework.h +++ b/sys/security/mac/mac_framework.h @@ -45,6 +45,8 @@ #ifndef _SYS_MAC_H #define _SYS_MAC_H +#include <sys/_label.h> + #ifndef _POSIX_MAC #define _POSIX_MAC #endif @@ -177,24 +179,6 @@ int __mac_set_file(const char *_path_p, struct mac *_mac_p); int __mac_set_proc(struct mac *_mac_p); #else /* _KERNEL */ -#endif /* _KERNEL */ - -/* - * XXXMAC: This shouldn't be exported to userland, but is because of ucred.h - * and various other messes. - */ - -#define MAC_MAX_POLICIES 4 - -struct label { - int l_flags; - union { - void *l_ptr; - long l_long; - } l_perpolicy[MAC_MAX_POLICIES]; -}; - -#ifdef _KERNEL /* * MAC entry point operations |