PERFORCE change 105098 for review

Robert Watson rwatson at FreeBSD.org
Sat Aug 26 09:13:12 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=105098

Change 105098 by rwatson at 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;


More information about the trustedbsd-cvs mailing list