lkml.org 
[lkml]   [2005]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[2.6.13.4 patch] kernel/audit.c: changing audit loglevel
Hello folks,

Here's a (very simple) patch to change the loglevel of messages
produced by the audit facility.

I was getting sick of the console polution the default loglevel
(KERNEL_WARN) was producing; I investigated and found out that
kernel/audit.c simply wasn't setting the loglevel of most messages,
so they were getting tagged with the default (KERNEL_WARN) in
kernel/printk.c

I know I could have set the default console logging level to KERN_ERR
or lower, but it seems much more reasonable to set the audit loglevel
to KERN_NOTICE instead.

I'm submiting this in hope it could be useful to someone else.
Please Cc: any comments to me directly (durval AT tmp DOT com DOT br).

Best regards,
--
Durval Menezes (durval AT tmp DOT com DOT br)

--- linux-2.6.13.4/kernel/audit.c.orig-20051111 2005-10-10 15:54:29.000000000 -0300
+++ linux-2.6.13.4-dm/kernel/audit.c 2005-11-12 16:43:39.000000000 -0200
@@ -673,7 +673,7 @@

audit_get_stamp(ab->ctx, &t, &serial);

- audit_log_format(ab, "audit(%lu.%03lu:%u): ",
+ audit_log_format(ab, KERN_NOTICE "audit(%lu.%03lu:%u): ",
t.tv_sec, t.tv_nsec/1000000, serial);
return ab;
}
==Eof==
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-12 21:26    [W:0.032 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site