aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2008-01-07 14:19:15 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2008-02-01 14:08:14 -0500
commite445deb593d67c8ed13bd357c780a93d78bc84cf (patch)
treeb6c14711659e16f817a4cb9eaa1fd8dba0c7b162
parent6246ccab99093a562044596dd868213caa0b2b4c (diff)
[AUDIT] include audit type in audit message when using printk
Currently audit drops the audit type when an audit message goes through printk instead of the audit deamon. This is a minor annoyance in that the audit type is no longer part of the message and the information the audit type conveys needs to be carried in, or derived from the message data. The attached patch includes the type number as part of the printk. Admittedly it isn't the type name that the audit deamon provides but I think this is better than dropping the type completely. Signed-pff-by: John Johansen <jjohansen@suse.de> Signed-off-by: Eric Paris <eparis@redhat.com>
-rw-r--r--kernel/audit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index 801c946dd24b..cf6698289426 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1438,7 +1438,8 @@ void audit_log_end(struct audit_buffer *ab)
1438 ab->skb = NULL; 1438 ab->skb = NULL;
1439 wake_up_interruptible(&kauditd_wait); 1439 wake_up_interruptible(&kauditd_wait);
1440 } else { 1440 } else {
1441 printk(KERN_NOTICE "%s\n", ab->skb->data + NLMSG_SPACE(0)); 1441 struct nlmsghdr *nlh = nlmsg_hdr(ab->skb);
1442 printk(KERN_NOTICE "type=%d %s\n", nlh->nlmsg_type, ab->skb->data + NLMSG_SPACE(0));
1442 } 1443 }
1443 } 1444 }
1444 audit_buffer_free(ab); 1445 audit_buffer_free(ab);