From owner-p4-projects@FreeBSD.ORG Tue Jan 25 23:59:36 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5B49616A4D0; Tue, 25 Jan 2005 23:59:36 +0000 (GMT) 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 1981D16A4CE for ; Tue, 25 Jan 2005 23:59:36 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D058E43D4C for ; Tue, 25 Jan 2005 23:59:35 +0000 (GMT) (envelope-from wsalamon@computer.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j0PNxZ4N087551 for ; Tue, 25 Jan 2005 23:59:35 GMT (envelope-from wsalamon@computer.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j0PNxZTc087548 for perforce@freebsd.org; Tue, 25 Jan 2005 23:59:35 GMT (envelope-from wsalamon@computer.org) Date: Tue, 25 Jan 2005 23:59:35 GMT Message-Id: <200501252359.j0PNxZTc087548@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to wsalamon@computer.org using -f From: Wayne Salamon To: Perforce Change Reviews Subject: PERFORCE change 69736 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jan 2005 23:59:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=69736 Change 69736 by wsalamon@rickenbacker on 2005/01/25 23:58:34 Modify test library to match include paths for FreeBSD, use system calls instead of syscall(). Affected files ... .. //depot/projects/trustedbsd/audit3/tools/regression/audit/test/include/audittest.h#2 edit .. //depot/projects/trustedbsd/audit3/tools/regression/audit/test/lib/Makefile#2 edit .. //depot/projects/trustedbsd/audit3/tools/regression/audit/test/lib/audittest.c#2 edit .. //depot/projects/trustedbsd/audit3/tools/regression/audit/test/lib/tlib.c#2 edit Differences ... ==== //depot/projects/trustedbsd/audit3/tools/regression/audit/test/include/audittest.h#2 (text+ko) ==== @@ -28,8 +28,8 @@ #include #include #include -#include -#include +#include +#include #define AUDITLOGSUFFIX "audit.log" #define INITIAL_AUID 666 ==== //depot/projects/trustedbsd/audit3/tools/regression/audit/test/lib/Makefile#2 (text+ko) ==== @@ -24,20 +24,22 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -# -LIB_NAME=libaudittest.a +LIB_NAME=audittest +LONG_LIB_NAME=lib$(LIB_NAME).a GCC=gcc -g -Wall -I/usr/include -I../include +LD=ld +AR=ar all: lib test lib: - $(GCC) -fno-common -c audittest.c - libtool -static -o $(LIB_NAME) *.o + $(GCC) -fPIC -c audittest.c + $(AR) -r $(LONG_LIB_NAME) *.o test: tlib.c - $(GCC) -lbsm $(LIB_NAME) tlib.c -o tlib + $(GCC) -lbsm tlib.c -o tlib audittest.o chmod +x tlib clean: - rm -f *.o $(LIB_NAME) tlib + rm -f *.o $(LONG_LIB_NAME) tlib ==== //depot/projects/trustedbsd/audit3/tools/regression/audit/test/lib/audittest.c#2 (text+ko) ==== @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include #include int aut_verbose; @@ -46,6 +46,7 @@ void aut_logfile(char *prefix) { int ret; + char *fn; if (prefix != NULL) sprintf(logfile, "%s.%s", prefix, AUDITLOGSUFFIX); @@ -57,7 +58,8 @@ perror("Audit log file open"); exit(-1); } - ret = syscall(SYS_auditctl, logfile); + fn = logfile; + ret = auditctl(AC_SETLOGFILE, &fn, sizeof(fn)); if (ret != 0) { perror("auditctl() failed"); exit(-1); @@ -105,7 +107,7 @@ { int ret; - ret = syscall(SYS_auditctl, NULL); + ret = auditctl(AC_SHUTDOWN, NULL, 0); if (ret != 0) { perror("auditctl() shutdown failed"); return (ret); ==== //depot/projects/trustedbsd/audit3/tools/regression/audit/test/lib/tlib.c#2 (text+ko) ==== @@ -26,8 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -#include -#include +#include +#include #include extern int aut_verbose;