PERFORCE change 18697 for review

Adam Migus amigus at freebsd.org
Sat Oct 5 03:27:18 GMT 2002


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

Change 18697 by amigus at amigus_ganyopa on 2002/10/04 20:26:36

	Put static __inline in .c file.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#105 integrate
.. //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.h#7 integrate

Differences ...

==== //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#105 (text+ko) ====

@@ -115,6 +115,17 @@
 static int	mac_mls_check_vnode_open(struct ucred *cred, struct vnode *vp,
 		    struct label *vnodelabel, mode_t acc_mode);
 
+static __inline int
+mls_bit_set_empty(u_char *set) {
+		int i;
+
+
+		for (i = 0; i < MAC_MLS_MAX_COMPARTMENTS >> 3; i++)
+			if (set[i] != 0)
+				return (0);
+		return (1);
+}
+
 static struct mac_mls *
 mls_alloc(int flag)
 {
@@ -2624,5 +2635,6 @@
 	{ MAC_OP_LAST, NULL }
 };
 
-MAC_POLICY_SET(mac_mls_ops, trustedbsd_mac_mls, "TrustedBSD MAC/MLS",
+MAC_POLICY_SET(mac_mls_ops, mac_mls, "TrustedBSD Compartmentalized MAC/MLS",
+    "Network Associates", "0.1", MAC_MLS_LABEL_NAME, &mac_mls_slot,
     MPC_LOADTIME_FLAG_NOTLATE, &mac_mls_slot);

==== //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.h#7 (text+ko) ====

@@ -101,14 +101,6 @@
  */
 #define	MAC_MLS_BIT_TEST(b, w)	(w[((b - 1) >> 3)] & (1 << ((b - 1) & 7)))
 #define	MAC_MLS_BIT_SET(b, w)	(w[((b - 1) >> 3)] |= (1 << ((b - 1) & 7)))
-
-static __inline int
-MAC_MLS_BIT_SET_EMPTY(u_char *__set) {
-		int i;
-		for (i = 0; i < MAC_MLS_MAX_COMPARTMENTS >> 3; i++)
-			if (__set[i] != 0)
-				return (0);
-		return (1);
-}
+#define MAC_MLS_BIT_SET_EMPTY(set)	mls_bit_set_empty(set)
 
 #endif /* !_SYS_SECURITY_MAC_MLS_H */
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