Date: Fri, 4 Oct 2002 20:27:18 -0700 (PDT) From: Adam Migus <amigus@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 18697 for review Message-ID: <200210050327.g953RIdo089589@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=18697 Change 18697 by amigus@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@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?200210050327.g953RIdo089589>