PERFORCE change 15091 for review

Robert Watson rwatson at freebsd.org
Mon Jul 29 02:31:19 GMT 2002


http://people.freebsd.org/~peter/p4db/chv.cgi?CH=15091

Change 15091 by rwatson at 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 at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list