From owner-p4-projects@FreeBSD.ORG Thu Jun 17 15:42:06 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C8F5816A4D0; Thu, 17 Jun 2004 15:42:05 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4BDA16A4CE for ; Thu, 17 Jun 2004 15:42:05 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F7C343D31 for ; Thu, 17 Jun 2004 15:42:05 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i5HFfdA6014832 for ; Thu, 17 Jun 2004 15:41:39 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i5HFfdwC014826 for perforce@freebsd.org; Thu, 17 Jun 2004 15:41:39 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Thu, 17 Jun 2004 15:41:39 GMT Message-Id: <200406171541.i5HFfdwC014826@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 55164 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jun 2004 15:42:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=55164 Change 55164 by rwatson@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