From owner-p4-projects@FreeBSD.ORG Tue Feb 28 14:07:42 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AF70016A424; Tue, 28 Feb 2006 14:07:41 +0000 (GMT) X-Original-To: perforce@freebsd.org 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 5446C16A420 for ; Tue, 28 Feb 2006 14:07:41 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DA2D43D48 for ; Tue, 28 Feb 2006 14:07:41 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k1SE7fxf029967 for ; Tue, 28 Feb 2006 14:07:41 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k1SE7eOC029964 for perforce@freebsd.org; Tue, 28 Feb 2006 14:07:40 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 28 Feb 2006 14:07:40 GMT Message-Id: <200602281407.k1SE7eOC029964@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 92527 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: Tue, 28 Feb 2006 14:07:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=92527 Change 92527 by rwatson@rwatson_lethe.cl.cam.ac.uk on 2006/02/28 14:07:01 Only implement au_close() if audit system calls are available, as otherwise we can't submit it. au_close_buffer() remains available even without audit system calls, so the remainder of the record construction calls remain useful. (Linux) Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#21 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#21 (text+ko) ==== @@ -30,7 +30,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#20 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#21 $ */ #include @@ -266,11 +266,13 @@ pthread_mutex_unlock(&mutex); } +#ifdef HAVE_AUDIT_SYSCALLS /* * Add the header token, identify any missing tokens. Write out the tokens to * the record memory and finally, call audit. */ -int au_close(int d, int keep, short event) +int +au_close(int d, int keep, short event) { au_record_t *rec; size_t tot_rec_size; @@ -318,6 +320,7 @@ au_teardown(rec); return (retval); } +#endif /* HAVE_AUDIT_SYSCALLS */ /* * au_close(), except onto an in-memory buffer. Buffer size as an argument,