From owner-p4-projects Sun Jul 28 19:31:30 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BB20337B401; Sun, 28 Jul 2002 19:31:20 -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 4909637B400 for ; Sun, 28 Jul 2002 19:31:20 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EEBCC43E3B for ; Sun, 28 Jul 2002 19:31:19 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6T2VJJU042920 for ; Sun, 28 Jul 2002 19:31:19 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6T2VJeH042908 for perforce@freebsd.org; Sun, 28 Jul 2002 19:31:19 -0700 (PDT) Date: Sun, 28 Jul 2002 19:31:19 -0700 (PDT) Message-Id: <200207290231.g6T2VJeH042908@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 15091 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=15091 Change 15091 by rwatson@rwatson_paprika on 2002/07/28 19:30:19 Move variable and sysctl definitions for the object labels to the top of kern_mac.c for consistency. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#210 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#210 (text+ko) ==== @@ -156,6 +156,32 @@ &mac_mmap_revocation_via_cow, 0, "Revoke mmap access to files via " "copy-on-write semantics, or by removing all write access"); +static unsigned int nmacmbufs, nmaccreds, nmacifnets, nmacbpfdescs, + nmacsockets, nmacmounts, nmactemp, nmacvnodes, nmacdevfsdirents, + nmacipqs, nmacpipes; +SYSCTL_UINT(_security_mac_debug, OID_AUTO, mbufs, CTLFLAG_RD, + &nmacmbufs, 0, "number of mbufs in use"); +SYSCTL_UINT(_security_mac_debug, OID_AUTO, creds, CTLFLAG_RD, + &nmaccreds, 0, "number of ucreds in use"); +SYSCTL_UINT(_security_mac_debug, OID_AUTO, ifnets, CTLFLAG_RD, + &nmacifnets, 0, "number of ifnets in use"); +SYSCTL_UINT(_security_mac_debug, OID_AUTO, ipqs, CTLFLAG_RD, + &nmacipqs, 0, "number of ipqs in use"); +SYSCTL_UINT(_security_mac_debug, OID_AUTO, bpfdescs, CTLFLAG_RD, + &nmacbpfdescs, 0, "number of bpfdescs in use"); +SYSCTL_UINT(_security_mac_debug, OID_AUTO, sockets, CTLFLAG_RD, + &nmacsockets, 0, "number of sockets in use"); +SYSCTL_UINT(_security_mac_debug, OID_AUTO, pipes, CTLFLAG_RD, + &nmacpipes, 0, "number of pipes in use"); +SYSCTL_UINT(_security_mac_debug, OID_AUTO, mounts, CTLFLAG_RD, + &nmacmounts, 0, "number of mounts in use"); +SYSCTL_UINT(_security_mac_debug, OID_AUTO, temp, CTLFLAG_RD, + &nmactemp, 0, "number of temporary labels in use"); +SYSCTL_UINT(_security_mac_debug, OID_AUTO, vnodes, CTLFLAG_RD, + &nmacvnodes, 0, "number of vnodes in use"); +SYSCTL_UINT(_security_mac_debug, OID_AUTO, devfsdirents, CTLFLAG_RD, + &nmacdevfsdirents, 0, "number of devfs dirents inuse"); + static int error_select(int error1, int error2); static int mac_externalize(struct label *label, struct mac *mac); static int mac_policy_register(struct mac_policy_conf *mpc); @@ -1358,32 +1384,6 @@ /* label->l_flags &= ~MAC_FLAG_INITIALIZED; */ } -static unsigned int nmacmbufs, nmaccreds, nmacifnets, nmacbpfdescs, - nmacsockets, nmacmounts, nmactemp, nmacvnodes, nmacdevfsdirents, - nmacipqs, nmacpipes; -SYSCTL_UINT(_security_mac_debug, OID_AUTO, mbufs, CTLFLAG_RD, - &nmacmbufs, 0, "number of mbufs in use"); -SYSCTL_UINT(_security_mac_debug, OID_AUTO, creds, CTLFLAG_RD, - &nmaccreds, 0, "number of ucreds in use"); -SYSCTL_UINT(_security_mac_debug, OID_AUTO, ifnets, CTLFLAG_RD, - &nmacifnets, 0, "number of ifnets in use"); -SYSCTL_UINT(_security_mac_debug, OID_AUTO, ipqs, CTLFLAG_RD, - &nmacipqs, 0, "number of ipqs in use"); -SYSCTL_UINT(_security_mac_debug, OID_AUTO, bpfdescs, CTLFLAG_RD, - &nmacbpfdescs, 0, "number of bpfdescs in use"); -SYSCTL_UINT(_security_mac_debug, OID_AUTO, sockets, CTLFLAG_RD, - &nmacsockets, 0, "number of sockets in use"); -SYSCTL_UINT(_security_mac_debug, OID_AUTO, pipes, CTLFLAG_RD, - &nmacpipes, 0, "number of pipes in use"); -SYSCTL_UINT(_security_mac_debug, OID_AUTO, mounts, CTLFLAG_RD, - &nmacmounts, 0, "number of mounts in use"); -SYSCTL_UINT(_security_mac_debug, OID_AUTO, temp, CTLFLAG_RD, - &nmactemp, 0, "number of temporary labels in use"); -SYSCTL_UINT(_security_mac_debug, OID_AUTO, vnodes, CTLFLAG_RD, - &nmacvnodes, 0, "number of vnodes in use"); -SYSCTL_UINT(_security_mac_debug, OID_AUTO, devfsdirents, CTLFLAG_RD, - &nmacdevfsdirents, 0, "number of devfs dirents inuse"); - int mac_init_mbuf(struct mbuf *m, int how) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message