From owner-p4-projects Fri Oct 4 20:27:23 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BAB3837B404; Fri, 4 Oct 2002 20:27:19 -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 4A1D437B401 for ; Fri, 4 Oct 2002 20:27:19 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3ABC43E6E for ; Fri, 4 Oct 2002 20:27:18 -0700 (PDT) (envelope-from amigus@FreeBSD.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g953RICo089592 for ; Fri, 4 Oct 2002 20:27:18 -0700 (PDT) (envelope-from amigus@FreeBSD.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g953RIdo089589 for perforce@freebsd.org; Fri, 4 Oct 2002 20:27:18 -0700 (PDT) Date: Fri, 4 Oct 2002 20:27:18 -0700 (PDT) Message-Id: <200210050327.g953RIdo089589@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to amigus@FreeBSD.org using -f From: Adam Migus Subject: PERFORCE change 18697 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=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