Date: Wed, 26 Jan 2005 04:57:39 GMT From: Wayne Salamon <wsalamon@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 69750 for review Message-ID: <200501260457.j0Q4vdx1011269@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <audittest.h> #include <sys/syscall.h> -#include <sys/audit.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/filio.h> #include <arpa/inet.h> #include <netinet/in.h> -#include <audittest.h> /* * 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 <audittest.h> #include <sys/syscall.h> -#include <sys/audit.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> -#include <audittest.h> /* * 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 <sys/syscall.h> -#include <sys/audit.h> +#include <audittest.h> #include <sys/event.h> +#include <sys/fcntl.h> #include <sys/time.h> -#include <sys/stat.h> -#include <sys/fcntl.h> -#include <audittest.h> /* * 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 <sys/syscall.h> -#include <sys/audit.h> -#include <sys/types.h> -#include <sys/stat.h> +#include <audittest.h> #include <sys/fcntl.h> -#include <sys/signal.h> -#include <sys/ptrace.h> #include <sys/uio.h> #include <sys/ktrace.h> -#include <audittest.h> +#include <sys/param.h> +#include <sys/ptrace.h> +#include <sys/signal.h> +#include <sys/stat.h> +#include <sys/syscall.h> +#include <sys/types.h> /* * 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 <audittest.h> #include <sys/syscall.h> -#include <sys/audit.h> #include <sys/stat.h> #include <sys/signal.h> -#include <audittest.h> /* * 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 <audittest.h> +#include <sys/resource.h> #include <sys/syscall.h> -#include <sys/audit.h> +#include <sys/signal.h> #include <sys/stat.h> -#include <sys/signal.h> -#include <sys/resource.h> -#include <audittest.h> /* * Test the auditing of some of the process-related system calls.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501260457.j0Q4vdx1011269>