Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e445deb593d67c8ed13bd357c780a93d78bc84cf
Commit:     e445deb593d67c8ed13bd357c780a93d78bc84cf
Parent:     6246ccab99093a562044596dd868213caa0b2b4c
Author:     Eric Paris <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 7 14:19:15 2008 -0500
Committer:  Al Viro <[EMAIL PROTECTED]>
CommitDate: Fri Feb 1 14:08:14 2008 -0500

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Eric Paris <[EMAIL PROTECTED]>
---
 kernel/audit.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index 801c946..cf66982 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1438,7 +1438,8 @@ void audit_log_end(struct audit_buffer *ab)
                        ab->skb = NULL;
                        wake_up_interruptible(&kauditd_wait);
                } else {
-                       printk(KERN_NOTICE "%s\n", ab->skb->data + 
NLMSG_SPACE(0));
+                       struct nlmsghdr *nlh = nlmsg_hdr(ab->skb);
+                       printk(KERN_NOTICE "type=%d %s\n", nlh->nlmsg_type, 
ab->skb->data + NLMSG_SPACE(0));
                }
        }
        audit_buffer_free(ab);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to