PERFORCE change 55164 for review
Robert Watson
rwatson at FreeBSD.org
Thu Jun 17 15:41:39 GMT 2004
http://perforce.freebsd.org/chv.cgi?CH=55164
Change 55164 by rwatson at rwatson_tislabs on 2004/06/17 15:41:00
When tearing down a label, assert that it was properly
initialized to help catch label corruption and multiple
freeing.
Affected files ...
.. //depot/projects/trustedbsd/mac/sys/security/mac/mac_label.c#4 edit
Differences ...
==== //depot/projects/trustedbsd/mac/sys/security/mac/mac_label.c#4 (text+ko) ====
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2003 Networks Associates Technology, Inc.
+ * Copyright (c) 2003-2004 Networks Associates Technology, Inc.
* All rights reserved.
*
* This software was developed for the FreeBSD Project in part by Network
@@ -75,6 +75,8 @@
KASSERT(size == sizeof(*label), ("mac_labelzone_dtor: wrong size\n"));
label = mem;
+ KASSERT(label->l_flags & MAC_FLAG_INITIALIZED,
+ ("mac_labelzone_dtor: label not initialized"));
#ifdef DIAGNOSTIC
bzero(label, sizeof(*label));
#else
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list