From owner-p4-projects Wed Sep 18 17:51:44 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 23A7237B406; Wed, 18 Sep 2002 17:51:41 -0700 (PDT) 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 C890A37B401 for ; Wed, 18 Sep 2002 17:51:40 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82ED843E4A for ; Wed, 18 Sep 2002 17:51:40 -0700 (PDT) (envelope-from amigus@FreeBSD.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g8J0peCo030728 for ; Wed, 18 Sep 2002 17:51:40 -0700 (PDT) (envelope-from amigus@FreeBSD.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g8J0peKG030717 for perforce@freebsd.org; Wed, 18 Sep 2002 17:51:40 -0700 (PDT) Date: Wed, 18 Sep 2002 17:51:40 -0700 (PDT) Message-Id: <200209190051.g8J0peKG030717@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to amigus@FreeBSD.org using -f From: Adam Migus Subject: PERFORCE change 17686 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17686 Change 17686 by amigus@amigus_caster on 2002/09/18 17:50:40 Fix crash when MAC_DEBUG is undefined. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#270 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#270 (text+ko) ==== @@ -98,17 +98,6 @@ SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0, "TrustedBSD MAC policy controls"); -SYSCTL_NODE(_security_mac, OID_AUTO, debug, CTLFLAG_RW, 0, - "TrustedBSD MAC debug info"); -SYSCTL_NODE(_security_mac_debug, OID_AUTO, counters, CTLFLAG_RW, 0, - "TrustedBSD MAC object counters"); - -static int mac_debug_label_fallback = 0; -SYSCTL_INT(_security_mac_debug, OID_AUTO, label_fallback, CTLFLAG_RW, - &mac_debug_label_fallback, 0, "Filesystems should fall back to fs label" - "when label is corrupted."); -TUNABLE_INT("security.mac.debug_label_fallback", - &mac_debug_label_fallback); #ifndef MAC_MAX_POLICIES #define MAC_MAX_POLICIES 8 @@ -178,6 +167,19 @@ "copy-on-write semantics, or by removing all write access"); #ifdef MAC_DEBUG +SYSCTL_NODE(_security_mac, OID_AUTO, debug, CTLFLAG_RW, 0, + "TrustedBSD MAC debug info"); + +static int mac_debug_label_fallback = 0; +SYSCTL_INT(_security_mac_debug, OID_AUTO, label_fallback, CTLFLAG_RW, + &mac_debug_label_fallback, 0, "Filesystems should fall back to fs label" + "when label is corrupted."); +TUNABLE_INT("security.mac.debug_label_fallback", + &mac_debug_label_fallback); + +SYSCTL_NODE(_security_mac_debug, OID_AUTO, counters, CTLFLAG_RW, 0, + "TrustedBSD MAC object counters"); + static unsigned int nmacmbufs, nmaccreds, nmacifnets, nmacbpfdescs, nmacsockets, nmacmounts, nmactemp, nmacvnodes, nmacdevfsdirents, nmacipqs, nmacpipes, nmacprocs; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message