diff options
author | rwatson <rwatson@FreeBSD.org> | 2002-10-20 03:41:09 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2002-10-20 03:41:09 +0000 |
commit | d9307dee7e7279a15ed0de61bfa68a8d02e6dcc4 (patch) | |
tree | 87f8f48372e37d9e4987db3675e7841b5bed29d4 /sys/security | |
parent | 0d45c270ec56df4f72cec8c43040f0ccc9488b09 (diff) | |
download | FreeBSD-src-d9307dee7e7279a15ed0de61bfa68a8d02e6dcc4.zip FreeBSD-src-d9307dee7e7279a15ed0de61bfa68a8d02e6dcc4.tar.gz |
If MAC_MAX_POLICIES isn't defined, don't try to define it, just let the
compile fail. MAC_MAX_POLICIES should always be defined, or we have
bigger problems at hand.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys/security')
-rw-r--r-- | sys/security/mac/mac_framework.c | 4 | ||||
-rw-r--r-- | sys/security/mac/mac_internal.h | 4 | ||||
-rw-r--r-- | sys/security/mac/mac_net.c | 4 | ||||
-rw-r--r-- | sys/security/mac/mac_pipe.c | 4 | ||||
-rw-r--r-- | sys/security/mac/mac_process.c | 4 | ||||
-rw-r--r-- | sys/security/mac/mac_syscalls.c | 4 | ||||
-rw-r--r-- | sys/security/mac/mac_system.c | 4 | ||||
-rw-r--r-- | sys/security/mac/mac_vfs.c | 4 |
8 files changed, 8 insertions, 24 deletions
diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c index 88e9636..556d1ff 100644 --- a/sys/security/mac/mac_framework.c +++ b/sys/security/mac/mac_framework.c @@ -99,12 +99,10 @@ SYSCTL_DECL(_security); SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0, "TrustedBSD MAC policy controls"); -#ifndef MAC_MAX_POLICIES -#define MAC_MAX_POLICIES 8 -#endif #if MAC_MAX_POLICIES > 32 #error "MAC_MAX_POLICIES too large" #endif + static unsigned int mac_max_policies = MAC_MAX_POLICIES; static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1; SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD, diff --git a/sys/security/mac/mac_internal.h b/sys/security/mac/mac_internal.h index 88e9636..556d1ff 100644 --- a/sys/security/mac/mac_internal.h +++ b/sys/security/mac/mac_internal.h @@ -99,12 +99,10 @@ SYSCTL_DECL(_security); SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0, "TrustedBSD MAC policy controls"); -#ifndef MAC_MAX_POLICIES -#define MAC_MAX_POLICIES 8 -#endif #if MAC_MAX_POLICIES > 32 #error "MAC_MAX_POLICIES too large" #endif + static unsigned int mac_max_policies = MAC_MAX_POLICIES; static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1; SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD, diff --git a/sys/security/mac/mac_net.c b/sys/security/mac/mac_net.c index 88e9636..556d1ff 100644 --- a/sys/security/mac/mac_net.c +++ b/sys/security/mac/mac_net.c @@ -99,12 +99,10 @@ SYSCTL_DECL(_security); SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0, "TrustedBSD MAC policy controls"); -#ifndef MAC_MAX_POLICIES -#define MAC_MAX_POLICIES 8 -#endif #if MAC_MAX_POLICIES > 32 #error "MAC_MAX_POLICIES too large" #endif + static unsigned int mac_max_policies = MAC_MAX_POLICIES; static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1; SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD, diff --git a/sys/security/mac/mac_pipe.c b/sys/security/mac/mac_pipe.c index 88e9636..556d1ff 100644 --- a/sys/security/mac/mac_pipe.c +++ b/sys/security/mac/mac_pipe.c @@ -99,12 +99,10 @@ SYSCTL_DECL(_security); SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0, "TrustedBSD MAC policy controls"); -#ifndef MAC_MAX_POLICIES -#define MAC_MAX_POLICIES 8 -#endif #if MAC_MAX_POLICIES > 32 #error "MAC_MAX_POLICIES too large" #endif + static unsigned int mac_max_policies = MAC_MAX_POLICIES; static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1; SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD, diff --git a/sys/security/mac/mac_process.c b/sys/security/mac/mac_process.c index 88e9636..556d1ff 100644 --- a/sys/security/mac/mac_process.c +++ b/sys/security/mac/mac_process.c @@ -99,12 +99,10 @@ SYSCTL_DECL(_security); SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0, "TrustedBSD MAC policy controls"); -#ifndef MAC_MAX_POLICIES -#define MAC_MAX_POLICIES 8 -#endif #if MAC_MAX_POLICIES > 32 #error "MAC_MAX_POLICIES too large" #endif + static unsigned int mac_max_policies = MAC_MAX_POLICIES; static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1; SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD, diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c index 88e9636..556d1ff 100644 --- a/sys/security/mac/mac_syscalls.c +++ b/sys/security/mac/mac_syscalls.c @@ -99,12 +99,10 @@ SYSCTL_DECL(_security); SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0, "TrustedBSD MAC policy controls"); -#ifndef MAC_MAX_POLICIES -#define MAC_MAX_POLICIES 8 -#endif #if MAC_MAX_POLICIES > 32 #error "MAC_MAX_POLICIES too large" #endif + static unsigned int mac_max_policies = MAC_MAX_POLICIES; static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1; SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD, diff --git a/sys/security/mac/mac_system.c b/sys/security/mac/mac_system.c index 88e9636..556d1ff 100644 --- a/sys/security/mac/mac_system.c +++ b/sys/security/mac/mac_system.c @@ -99,12 +99,10 @@ SYSCTL_DECL(_security); SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0, "TrustedBSD MAC policy controls"); -#ifndef MAC_MAX_POLICIES -#define MAC_MAX_POLICIES 8 -#endif #if MAC_MAX_POLICIES > 32 #error "MAC_MAX_POLICIES too large" #endif + static unsigned int mac_max_policies = MAC_MAX_POLICIES; static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1; SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD, diff --git a/sys/security/mac/mac_vfs.c b/sys/security/mac/mac_vfs.c index 88e9636..556d1ff 100644 --- a/sys/security/mac/mac_vfs.c +++ b/sys/security/mac/mac_vfs.c @@ -99,12 +99,10 @@ SYSCTL_DECL(_security); SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0, "TrustedBSD MAC policy controls"); -#ifndef MAC_MAX_POLICIES -#define MAC_MAX_POLICIES 8 -#endif #if MAC_MAX_POLICIES > 32 #error "MAC_MAX_POLICIES too large" #endif + static unsigned int mac_max_policies = MAC_MAX_POLICIES; static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1; SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD, |