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
This commit is contained in:
parent
6c8733c2a3
commit
a13c67da35
@ -99,12 +99,10 @@ SYSCTL_DECL(_security);
|
|||||||
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
||||||
"TrustedBSD MAC policy controls");
|
"TrustedBSD MAC policy controls");
|
||||||
|
|
||||||
#ifndef MAC_MAX_POLICIES
|
|
||||||
#define MAC_MAX_POLICIES 8
|
|
||||||
#endif
|
|
||||||
#if MAC_MAX_POLICIES > 32
|
#if MAC_MAX_POLICIES > 32
|
||||||
#error "MAC_MAX_POLICIES too large"
|
#error "MAC_MAX_POLICIES too large"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
||||||
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
||||||
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
||||||
|
@ -99,12 +99,10 @@ SYSCTL_DECL(_security);
|
|||||||
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
||||||
"TrustedBSD MAC policy controls");
|
"TrustedBSD MAC policy controls");
|
||||||
|
|
||||||
#ifndef MAC_MAX_POLICIES
|
|
||||||
#define MAC_MAX_POLICIES 8
|
|
||||||
#endif
|
|
||||||
#if MAC_MAX_POLICIES > 32
|
#if MAC_MAX_POLICIES > 32
|
||||||
#error "MAC_MAX_POLICIES too large"
|
#error "MAC_MAX_POLICIES too large"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
||||||
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
||||||
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
||||||
|
@ -99,12 +99,10 @@ SYSCTL_DECL(_security);
|
|||||||
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
||||||
"TrustedBSD MAC policy controls");
|
"TrustedBSD MAC policy controls");
|
||||||
|
|
||||||
#ifndef MAC_MAX_POLICIES
|
|
||||||
#define MAC_MAX_POLICIES 8
|
|
||||||
#endif
|
|
||||||
#if MAC_MAX_POLICIES > 32
|
#if MAC_MAX_POLICIES > 32
|
||||||
#error "MAC_MAX_POLICIES too large"
|
#error "MAC_MAX_POLICIES too large"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
||||||
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
||||||
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
||||||
|
@ -99,12 +99,10 @@ SYSCTL_DECL(_security);
|
|||||||
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
||||||
"TrustedBSD MAC policy controls");
|
"TrustedBSD MAC policy controls");
|
||||||
|
|
||||||
#ifndef MAC_MAX_POLICIES
|
|
||||||
#define MAC_MAX_POLICIES 8
|
|
||||||
#endif
|
|
||||||
#if MAC_MAX_POLICIES > 32
|
#if MAC_MAX_POLICIES > 32
|
||||||
#error "MAC_MAX_POLICIES too large"
|
#error "MAC_MAX_POLICIES too large"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
||||||
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
||||||
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
||||||
|
@ -99,12 +99,10 @@ SYSCTL_DECL(_security);
|
|||||||
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
||||||
"TrustedBSD MAC policy controls");
|
"TrustedBSD MAC policy controls");
|
||||||
|
|
||||||
#ifndef MAC_MAX_POLICIES
|
|
||||||
#define MAC_MAX_POLICIES 8
|
|
||||||
#endif
|
|
||||||
#if MAC_MAX_POLICIES > 32
|
#if MAC_MAX_POLICIES > 32
|
||||||
#error "MAC_MAX_POLICIES too large"
|
#error "MAC_MAX_POLICIES too large"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
||||||
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
||||||
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
||||||
|
@ -99,12 +99,10 @@ SYSCTL_DECL(_security);
|
|||||||
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
||||||
"TrustedBSD MAC policy controls");
|
"TrustedBSD MAC policy controls");
|
||||||
|
|
||||||
#ifndef MAC_MAX_POLICIES
|
|
||||||
#define MAC_MAX_POLICIES 8
|
|
||||||
#endif
|
|
||||||
#if MAC_MAX_POLICIES > 32
|
#if MAC_MAX_POLICIES > 32
|
||||||
#error "MAC_MAX_POLICIES too large"
|
#error "MAC_MAX_POLICIES too large"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
||||||
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
||||||
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
||||||
|
@ -99,12 +99,10 @@ SYSCTL_DECL(_security);
|
|||||||
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
||||||
"TrustedBSD MAC policy controls");
|
"TrustedBSD MAC policy controls");
|
||||||
|
|
||||||
#ifndef MAC_MAX_POLICIES
|
|
||||||
#define MAC_MAX_POLICIES 8
|
|
||||||
#endif
|
|
||||||
#if MAC_MAX_POLICIES > 32
|
#if MAC_MAX_POLICIES > 32
|
||||||
#error "MAC_MAX_POLICIES too large"
|
#error "MAC_MAX_POLICIES too large"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
||||||
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
||||||
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
||||||
|
@ -99,12 +99,10 @@ SYSCTL_DECL(_security);
|
|||||||
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
||||||
"TrustedBSD MAC policy controls");
|
"TrustedBSD MAC policy controls");
|
||||||
|
|
||||||
#ifndef MAC_MAX_POLICIES
|
|
||||||
#define MAC_MAX_POLICIES 8
|
|
||||||
#endif
|
|
||||||
#if MAC_MAX_POLICIES > 32
|
#if MAC_MAX_POLICIES > 32
|
||||||
#error "MAC_MAX_POLICIES too large"
|
#error "MAC_MAX_POLICIES too large"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
||||||
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
||||||
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
||||||
|
@ -99,12 +99,10 @@ SYSCTL_DECL(_security);
|
|||||||
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
|
||||||
"TrustedBSD MAC policy controls");
|
"TrustedBSD MAC policy controls");
|
||||||
|
|
||||||
#ifndef MAC_MAX_POLICIES
|
|
||||||
#define MAC_MAX_POLICIES 8
|
|
||||||
#endif
|
|
||||||
#if MAC_MAX_POLICIES > 32
|
#if MAC_MAX_POLICIES > 32
|
||||||
#error "MAC_MAX_POLICIES too large"
|
#error "MAC_MAX_POLICIES too large"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
static unsigned int mac_max_policies = MAC_MAX_POLICIES;
|
||||||
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
|
||||||
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
|
||||||
|
Loading…
Reference in New Issue
Block a user