summaryrefslogtreecommitdiff
path: root/sys/security/mac_mls/mac_mls.c
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2004-07-28 07:01:33 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2004-07-28 07:01:33 +0000
commit1477f58850224383c64b156a745f64bdb9dda936 (patch)
treeef056cab170377399258c31a22ff9ddb327398f8 /sys/security/mac_mls/mac_mls.c
parent445e045b0d8959ad639767025a83c8367b5200e7 (diff)
Notes
Diffstat (limited to 'sys/security/mac_mls/mac_mls.c')
-rw-r--r--sys/security/mac_mls/mac_mls.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/security/mac_mls/mac_mls.c b/sys/security/mac_mls/mac_mls.c
index ee390c34d7bd..3c5a88b97e61 100644
--- a/sys/security/mac_mls/mac_mls.c
+++ b/sys/security/mac_mls/mac_mls.c
@@ -113,6 +113,7 @@ SYSCTL_INT(_security_mac_mls, OID_AUTO, max_compartments, CTLFLAG_RD,
static int mac_mls_slot;
#define SLOT(l) ((struct mac_mls *)LABEL_TO_SLOT((l), mac_mls_slot).l_ptr)
+#define SLOT_SET(l, val) (LABEL_TO_SLOT((l), mac_mls_slot).l_ptr = (val))
static uma_zone_t zone_mls;
@@ -467,14 +468,14 @@ static void
mac_mls_init_label(struct label *label)
{
- SLOT(label) = mls_alloc(M_WAITOK);
+ SLOT_SET(label, mls_alloc(M_WAITOK));
}
static int
mac_mls_init_label_waitcheck(struct label *label, int flag)
{
- SLOT(label) = mls_alloc(flag);
+ SLOT_SET(label, mls_alloc(flag));
if (SLOT(label) == NULL)
return (ENOMEM);
@@ -486,7 +487,7 @@ mac_mls_destroy_label(struct label *label)
{
mls_free(SLOT(label));
- SLOT(label) = NULL;
+ SLOT_SET(label, NULL);
}
/*