]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[AUDIT] Add End of Event record
authorEric Paris <eparis@redhat.com>
Mon, 7 Jan 2008 18:49:15 +0000 (13:49 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 1 Feb 2008 19:07:19 +0000 (14:07 -0500)
This patch adds an end of event record type. It will be sent by the kernel as
the last record when a multi-record event is triggered. This will aid realtime
analysis programs since they will now reliably know they have the last record
to complete an event. The audit daemon filters this and will not write it to
disk.

Signed-off-by: Steve Grubb <sgrubb redhat com>
Signed-off-by: Eric Paris <eparis@redhat.com>
include/linux/audit.h
kernel/auditsc.c

index 52f1b12505a9bcdfb5e3eaa368ec63e7d82afe0c..4d1c2f2fcc1b335d982af175bd6abcc96775fc21 100644 (file)
@@ -98,6 +98,7 @@
 #define AUDIT_FD_PAIR          1317    /* audit record for pipe/socketpair */
 #define AUDIT_OBJ_PID          1318    /* ptrace target */
 #define AUDIT_TTY              1319    /* Input on an administrative TTY */
+#define AUDIT_EOE              1320    /* End of multi-record event */
 
 #define AUDIT_AVC              1400    /* SE Linux avc denial or grant */
 #define AUDIT_SELINUX_ERR      1401    /* Internal SE Linux Errors */
index 4e67abb02904fd8ab4a9642a62a4ad3e46c486a0..6e5de767bad1efb95202e21b0defd6cb4dd2dddd 100644 (file)
@@ -1270,6 +1270,11 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts
 
                audit_log_end(ab);
        }
+
+       /* Send end of event record to help user space know we are finished */
+       ab = audit_log_start(context, GFP_KERNEL, AUDIT_EOE);
+       if (ab)
+               audit_log_end(ab);
        if (call_panic)
                audit_panic("error converting sid to string");
 }