Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jul 2002 19:31:19 -0700 (PDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 15091 for review
Message-ID:  <200207290231.g6T2VJeH042908@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207290231.g6T2VJeH042908>