summaryrefslogtreecommitdiff
path: root/sys/security/mac/mac_framework.c
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2003-05-08 19:49:42 +0000
committerRobert Watson <rwatson@FreeBSD.org>2003-05-08 19:49:42 +0000
commitb2aef57123aba7de146da4f9fbcf02bb3c09292d (patch)
tree481cec734e3cbd5e6cf5aee3361b05e7335674aa /sys/security/mac/mac_framework.c
parent005fd5b64b04ffdb158c5e22de77924c74271f33 (diff)
Notes
Diffstat (limited to 'sys/security/mac/mac_framework.c')
-rw-r--r--sys/security/mac/mac_framework.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c
index 44e165878261..fb06edea3012 100644
--- a/sys/security/mac/mac_framework.c
+++ b/sys/security/mac/mac_framework.c
@@ -98,14 +98,14 @@ SYSCTL_DECL(_security);
SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
"TrustedBSD MAC policy controls");
-#if MAC_MAX_POLICIES > 32
-#error "MAC_MAX_POLICIES too large"
+#if MAC_MAX_SLOTS > 32
+#error "MAC_MAX_SLOTS 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,
- &mac_max_policies, 0, "");
+static unsigned int mac_max_slots = MAC_MAX_SLOTS;
+static unsigned int mac_slot_offsets_free = (1 << MAC_MAX_SLOTS) - 1;
+SYSCTL_UINT(_security_mac, OID_AUTO, max_slots, CTLFLAG_RD,
+ &mac_max_slots, 0, "");
/*
* Has the kernel started generating labeled objects yet? All read/write
@@ -645,13 +645,13 @@ mac_policy_register(struct mac_policy_conf *mpc)
}
}
if (mpc->mpc_field_off != NULL) {
- slot = ffs(mac_policy_offsets_free);
+ slot = ffs(mac_slot_offsets_free);
if (slot == 0) {
error = ENOMEM;
goto out;
}
slot--;
- mac_policy_offsets_free &= ~(1 << slot);
+ mac_slot_offsets_free &= ~(1 << slot);
*mpc->mpc_field_off = slot;
}
mpc->mpc_runtime_flags |= MPC_RUNTIME_FLAG_REGISTERED;