Gergely Nagy wrote:
> Jonathan Nieder <[email protected]> writes:

>> It looks like intended behavior.  I guess the syslogd should be using
>> CAP_SYSLOG these days.
>
> That is correct, even though I personally find the warning stupid and
> only annoying users.

I agree, especially since it's a normal condition when using a new
kernel with old userspace.  But people writing userspace tools deserve
a hint that they are doing something discouraged.  How about something
like this?

Signed-off-by: Jonathan Nieder <[email protected]>
---
 kernel/printk.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git i/kernel/printk.c w/kernel/printk.c
index 37dff342..db64c951 100644
--- i/kernel/printk.c
+++ w/kernel/printk.c
@@ -318,7 +318,8 @@ static int check_syslog_permissions(int type, bool 
from_file)
                        return 0;
                /* For historical reasons, accept CAP_SYS_ADMIN too, with a 
warning */
                if (capable(CAP_SYS_ADMIN)) {
-                       WARN_ONCE(1, "Attempt to access syslog with 
CAP_SYS_ADMIN "
+                       printk_once(KERN_WARNING
+                                "Attempt to access syslog with CAP_SYS_ADMIN "
                                 "but no CAP_SYSLOG (deprecated).\n");
                        return 0;
                }
-- 



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to