From owner-trustedbsd-cvs@FreeBSD.ORG Sat Aug 26 09:13:12 2006 Return-Path: X-Original-To: trustedbsd-cvs@freebsd.org Delivered-To: trustedbsd-cvs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3CBC216A4DE for ; Sat, 26 Aug 2006 09:13:12 +0000 (UTC) (envelope-from owner-perforce@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 79D9F43D46 for ; Sat, 26 Aug 2006 09:13:11 +0000 (GMT) (envelope-from owner-perforce@freebsd.org) Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by cyrus.watson.org (Postfix) with ESMTP id 9242046DAA for ; Sat, 26 Aug 2006 05:13:10 -0400 (EDT) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 2EBE0569E2; Sat, 26 Aug 2006 09:12:22 +0000 (GMT) (envelope-from owner-perforce@freebsd.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 27DDF16A4E2; Sat, 26 Aug 2006 09:12:22 +0000 (UTC) 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 03A4816A4DF for ; Sat, 26 Aug 2006 09:12:22 +0000 (UTC) (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 761EE43D46 for ; Sat, 26 Aug 2006 09:12:21 +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.6/8.13.6) with ESMTP id k7Q9CL5s037429 for ; Sat, 26 Aug 2006 09:12:21 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7Q9CKQD037426 for perforce@freebsd.org; Sat, 26 Aug 2006 09:12:20 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sat, 26 Aug 2006 09:12:20 GMT Message-Id: <200608260912.k7Q9CKQD037426@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 105098 for review X-BeenThere: trustedbsd-cvs@FreeBSD.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: TrustedBSD CVS and Perforce commit message list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Aug 2006 09:13:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=105098 Change 105098 by rwatson@rwatson_sesame on 2006/08/26 09:12:01 Allow the user process to query the kernel's notion of a maximum audit record size at run-time, which can be used by the user process to size the user space buffer it reads into from the audit pipe. Affected files ... .. //depot/projects/trustedbsd/audit3/share/man/man4/auditpipe.4#7 edit .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_ioctl.h#14 edit .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_pipe.c#29 edit Differences ... ==== //depot/projects/trustedbsd/audit3/share/man/man4/auditpipe.4#7 (text+ko) ==== @@ -74,7 +74,7 @@ .Ss Audit Pipe Queue Ioctls The following ioctls retrieve and set various audit pipe record queue properties: -.Bl -tag -width AUDITPIPE_GET_QLIMIT_MIN +.Bl -tag -width AUDITPIPE_GET_MAXAUDITDATA .It AUDITPIPE_GET_QLEN Query the current number of records available for reading on the pipe. .It AUDITPIPE_GET_QLIMIT @@ -95,6 +95,9 @@ Flush all outstanding records on the audit pipe; useful after setting initial preselection properties to delete records queued during the configuration process which may not match the interests of the user process. +.It AUDITPIPE_GET_MAXAUDITDATA +Query the maximum size of an audit record, which is a useful minimum size for +a user space buffer intended to hold audit records read from the audit pipe. .El .Ss Audit Pipe Preselection Mode Ioctls By default, the audit pipe facility configures pipes to present records ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_ioctl.h#14 (text+ko) ==== @@ -73,6 +73,7 @@ #define AUDITPIPE_GET_PRESELECT_MODE _IOR(AUDITPIPE_IOBASE, 14, int) #define AUDITPIPE_SET_PRESELECT_MODE _IOW(AUDITPIPE_IOBASE, 15, int) #define AUDITPIPE_FLUSH _IO(AUDITPIPE_IOBASE, 16) +#define AUDITPIPE_GET_MAXAUDITDATA _IOR(AUDITPIPE_IOBASE, 17, u_int) /* * Ioctls to retrieve audit pipe statistics. ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_pipe.c#29 (text+ko) ==== @@ -855,6 +855,11 @@ error = 0; break; + case AUDITPIPE_GET_MAXAUDITDATA: + *(u_int *)data = MAXAUDITDATA; + error = 0; + break; + case AUDITPIPE_GET_INSERTS: *(u_int *)data = ap->ap_inserts; error = 0;