From owner-p4-projects@FreeBSD.ORG Tue Feb 28 12:42:00 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 93E9716A424; Tue, 28 Feb 2006 12:41:59 +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 3810316A420 for ; Tue, 28 Feb 2006 12:41:59 +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 EE2DC43D68 for ; Tue, 28 Feb 2006 12:41:55 +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 k1SCftCB019282 for ; Tue, 28 Feb 2006 12:41:55 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 k1SCftIC019279 for perforce@freebsd.org; Tue, 28 Feb 2006 12:41:55 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 28 Feb 2006 12:41:55 GMT Message-Id: <200602281241.k1SCftIC019279@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 92523 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 12:42:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=92523 Change 92523 by rwatson@rwatson_peppercorn on 2006/02/28 12:41:03 Test for auditon() system call and provide a compile-time definition if it is available; this will make it possibly to not compile some run-time audit tools (such as audit, auditd) and components of libbsm on systems without the system calls -- otherwise you may get linking errors due to undefined symbols. Affected files ... .. //depot/projects/trustedbsd/openbsm/configure#10 edit .. //depot/projects/trustedbsd/openbsm/configure.ac#13 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/configure#10 (xtext) ==== @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#11 . +# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#12 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for OpenBSM 1.0a5. # @@ -22814,6 +22814,68 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +# Systems may not define key audit system calls, in which case libbsm cannot +# depend on them or it will generate link-time or run-time errors. Test for +# just one. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + #include + +int +main () +{ + + int err; + + err = auditon(0, NULL, 0); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AUDIT_SYSCALLS +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_config_files="$ac_config_files Makefile bin/Makefile bin/audit/Makefile bin/auditd/Makefile bin/auditreduce/Makefile bin/praudit/Makefile bsm/Makefile libbsm/Makefile man/Makefile tools/Makefile" ==== //depot/projects/trustedbsd/openbsm/configure.ac#13 (text+ko) ==== @@ -3,7 +3,7 @@ AC_PREREQ(2.59) AC_INIT([OpenBSM], [1.0a5], [trustedbsd-audit@TrustesdBSD.org],[openbsm]) -AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#12 $]) +AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#13 $]) AC_CONFIG_SRCDIR([bin/auditreduce/auditreduce.c]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_HEADER([config/config.h]) @@ -74,6 +74,20 @@ AC_DEFINE(HAVE_FULL_QUEUE_H,, Define if queue.h includes LIST_FIRST) ]) +# Systems may not define key audit system calls, in which case libbsm cannot +# depend on them or it will generate link-time or run-time errors. Test for +# just one. +AC_TRY_LINK([ + #include + #include +], [ + int err; + + err = auditon(0, NULL, 0); +], [ +AC_DEFINE(HAVE_AUDIT_SYSCALLS,, Define if audit system calls present) +]) + AC_CONFIG_FILES([Makefile bin/Makefile bin/audit/Makefile