From owner-p4-projects@FreeBSD.ORG Fri Dec 19 11:55:10 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3BA661065739; Fri, 19 Dec 2008 11:55:08 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B53A1065735 for ; Fri, 19 Dec 2008 11:55:08 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 07D608FC1C for ; Fri, 19 Dec 2008 11:55:08 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mBJBt6TS092287 for ; Fri, 19 Dec 2008 11:55:06 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mBJBt67V092285 for perforce@freebsd.org; Fri, 19 Dec 2008 11:55:06 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Fri, 19 Dec 2008 11:55:06 GMT Message-Id: <200812191155.mBJBt67V092285@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 154990 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2008 11:55:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=154990 Change 154990 by rwatson@rwatson_cinnamon_macosx on 2008/12/19 11:54:36 Only use ASL access control tags if they are defined in the build environment; arguably we should detect them with configure...? This allows OpenBSM to build on Leopard again. Affected files ... .. //depot/projects/trustedbsd/openbsm/bin/auditd/auditd_darwin.c#2 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/bin/auditd/auditd_darwin.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd_darwin.c#1 $ + * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd_darwin.c#2 $ */ #include @@ -103,6 +103,7 @@ au_aslclient = asl_open("auditd", "org.trustedbsd.auditd", opt); au_aslmsg = asl_new(ASL_TYPE_MSG); +#ifdef ASL_KEY_READ_UID /* * Make it only so the audit administrator and members of the audit * review group (if used) have access to the auditd system log messages. @@ -110,9 +111,12 @@ asl_set(au_aslmsg, ASL_KEY_READ_UID, "0"); asprintf(&cp, "%u", gid); if (cp != NULL) { +#ifdef ASL_KEY_READ_GID asl_set(au_aslmsg, ASL_KEY_READ_GID, cp); +#endif free(cp); } +#endif /* * Set the client-side system log filtering.