diff options
author | rwatson <rwatson@FreeBSD.org> | 2006-08-26 17:59:31 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2006-08-26 17:59:31 +0000 |
commit | c9215ad31ee7151f14480cf208a23d1755c2fb75 (patch) | |
tree | cf08b4fc9b38ca8232298b00c544efb89faf19b5 /sys/security | |
parent | a1c6033ca74cc1b61ac2df034d45311a95776cc2 (diff) | |
download | FreeBSD-src-c9215ad31ee7151f14480cf208a23d1755c2fb75.zip FreeBSD-src-c9215ad31ee7151f14480cf208a23d1755c2fb75.tar.gz |
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.
Perforce change: 105098
Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/security')
-rw-r--r-- | sys/security/audit/audit_ioctl.h | 1 | ||||
-rw-r--r-- | sys/security/audit/audit_pipe.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/security/audit/audit_ioctl.h b/sys/security/audit/audit_ioctl.h index e80346f..b68d359 100644 --- a/sys/security/audit/audit_ioctl.h +++ b/sys/security/audit/audit_ioctl.h @@ -73,6 +73,7 @@ struct auditpipe_ioctl_preselect { #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. diff --git a/sys/security/audit/audit_pipe.c b/sys/security/audit/audit_pipe.c index 21931af..6bea514 100644 --- a/sys/security/audit/audit_pipe.c +++ b/sys/security/audit/audit_pipe.c @@ -855,6 +855,11 @@ audit_pipe_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, 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; |