From owner-p4-projects@FreeBSD.ORG Wed Jan 26 04:57:41 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E822A16A4D0; Wed, 26 Jan 2005 04:57:40 +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 A4C1C16A4CE for ; Wed, 26 Jan 2005 04:57:40 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59EE543D1F for ; Wed, 26 Jan 2005 04:57:40 +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 j0Q4vehS011272 for ; Wed, 26 Jan 2005 04:57:40 GMT (envelope-from wsalamon@computer.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j0Q4vdx1011269 for perforce@freebsd.org; Wed, 26 Jan 2005 04:57:39 GMT (envelope-from wsalamon@computer.org) Date: Wed, 26 Jan 2005 04:57:39 GMT Message-Id: <200501260457.j0Q4vdx1011269@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 69750 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: Wed, 26 Jan 2005 04:57:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=69750 Change 69750 by wsalamon@rickenbacker on 2005/01/26 04:56:45 Changes necessary to compile on FreeBSD. Also remove unecessary include of audit.h from several files. Most of tkevent.c is if'd out because kqueue/kevent are not audited at the present time. Affected files ... .. //depot/projects/trustedbsd/audit3/tools/regression/audit/test/net/tinetsock.c#2 edit .. //depot/projects/trustedbsd/audit3/tools/regression/audit/test/net/tunixsock.c#2 edit .. //depot/projects/trustedbsd/audit3/tools/regression/audit/test/other/tkevent.c#2 edit .. //depot/projects/trustedbsd/audit3/tools/regression/audit/test/process/tfork.c#2 edit .. //depot/projects/trustedbsd/audit3/tools/regression/audit/test/process/tlogin.c#2 edit .. //depot/projects/trustedbsd/audit3/tools/regression/audit/test/process/tprocess.c#2 edit Differences ... ==== //depot/projects/trustedbsd/audit3/tools/regression/audit/test/net/tinetsock.c#2 (text+ko) ==== @@ -25,14 +25,13 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ +#include #include -#include #include #include #include #include #include -#include /* * Test the auditing of the INET socket system calls. ==== //depot/projects/trustedbsd/audit3/tools/regression/audit/test/net/tunixsock.c#2 (text+ko) ==== @@ -25,12 +25,11 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ +#include #include -#include #include #include #include -#include /* * Test the auditing of the Unix socket system calls. @@ -62,7 +61,7 @@ aut_assert(AUE_SOCKET); strcpy(tempname, "tempSock.XXXX"); - mktemp(tempname); + mkstemp(tempname); sname.sun_family = AF_UNIX; strcpy(sname.sun_path, tempname); ==== //depot/projects/trustedbsd/audit3/tools/regression/audit/test/other/tkevent.c#2 (text+ko) ==== @@ -25,13 +25,10 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#include -#include +#include #include +#include #include -#include -#include -#include /* * Test the auditing of the kqueue/kevent system calls. @@ -40,6 +37,10 @@ #define AUDIT_CLASSES (AU_OTHER) +// At one time, kqueue(0/kevent() were audited in Darwin, but was later removed +// If it is ever put back in place, this test program is a start. +#if 0 + int kqd; struct kevent kev; int fflags; @@ -66,10 +67,8 @@ fflags = NOTE_EXIT; EV_SET(&changelist[0], pid, EVFILT_PROC, EV_ADD, fflags, 0, NULL); AUT_PRINTF("Registering for event ID (PID) %d\n", pid); -/* if (kevent(kqd, changelist, 1, eventlist, 1, &ts) < 0) AUT_PERROR("kevent(pid)"); -*/ fd = open("/dev/null", O_RDONLY, S_IROTH); if (fd < 0) @@ -83,5 +82,6 @@ fd = open("/dev/null", O_RDONLY, S_IROTH); aut_shutdown(); +#endif exit(0); } ==== //depot/projects/trustedbsd/audit3/tools/regression/audit/test/process/tfork.c#2 (text+ko) ==== @@ -25,16 +25,16 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#include -#include -#include -#include +#include #include -#include -#include #include #include -#include +#include +#include +#include +#include +#include +#include /* * Test the auditing of fork, exec, ktrace and ptrace system calls. @@ -80,10 +80,6 @@ AUT_PERROR("fork"); aut_assert(AUE_FORK); - /* Generate a success AUE_SETPRIVEXEC record */ - setprivexec(1); - aut_assert(AUE_SETPRIVEXEC); - /* Generate a success AUE_EXECVE record */ if (child_pid == 0) { execv("child", argv); ==== //depot/projects/trustedbsd/audit3/tools/regression/audit/test/process/tlogin.c#2 (text+ko) ==== @@ -25,11 +25,10 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ +#include #include -#include #include #include -#include /* * Test the auditing of the login system call. ==== //depot/projects/trustedbsd/audit3/tools/regression/audit/test/process/tprocess.c#2 (text+ko) ==== @@ -25,12 +25,11 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ +#include +#include #include -#include +#include #include -#include -#include -#include /* * Test the auditing of some of the process-related system calls.