From 5c700f29d95ceac55c894be451b662b27ad93a0c Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Wed, 20 Dec 2006 23:13:04 +0000 Subject: [PATCH] Staticize and comment zone_label. Obtained from: TrustedBSD Project --- sys/security/mac/mac_label.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/security/mac/mac_label.c b/sys/security/mac/mac_label.c index 572d598cde4c..9e162a4db2a2 100644 --- a/sys/security/mac/mac_label.c +++ b/sys/security/mac/mac_label.c @@ -44,7 +44,13 @@ __FBSDID("$FreeBSD$"); #include #include -uma_zone_t zone_label; +/* + * zone_label is the UMA zone from which all labels are allocated. Label + * structures are initialized to zero bytes so that policies see a NULL/0 + * slot on first use, even if the policy is loaded after the label is + * allocated for an object. + */ +static uma_zone_t zone_label; static int mac_labelzone_ctor(void *mem, int size, void *arg, int flags); static void mac_labelzone_dtor(void *mem, int size, void *arg);