[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110803164837.GA2669@elie>
Date: Wed, 3 Aug 2011 18:48:37 +0200
From: Jonathan Nieder <jrnieder@...il.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: "Serge E. Hallyn" <serge@...lyn.com>,
Gergely Nagy <algernon@...abit.hu>, david@...g.hm,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Marc Koschewski <marc@...nowledge.org>,
lkml <linux-kernel@...r.kernel.org>,
James Morris <jmorris@...ei.org>,
Nick Bowler <nbowler@...iptictech.com>
Subject: [PATCH/RFC] cap_syslog: make CAP_SYS_ADMIN deprecation notice less
alarming
syslog-ng versions in active use assume that CAP_SYS_ADMIN is
sufficent to access syslog. As a result, ever since CAP_SYSLOG was
introduce in v2.6.38-rc1~429^2~18 (security: Define CAP_SYSLOG,
2010-11-25), they have triggered a warning, complete with kernel
backtrace.
v2.6.38-rc5~46 (cap_syslog: accept CAP_SYS_ADMIN for now, 2011-02-10)
made things a little better by removing the regression in behavior,
just keeping the WARN_ONCE. But still, this is a warning that adds
many lines to syslog, sets a taint flag, and alarms sysadmins when
nothing worse has happened than use of an old userspace with a recent
kernel.
Convert the WARN_ONCE to a printk_once to avoid this while continuing
to give userspace developers a hint that this is an unwanted
backward-compatibility feature and won't be around forever.
Reported-by: Ralf Hildebrandt <ralf.hildebrandt@...rite.de>
Reported-by: Niels <zorglub_olsen@...mail.com>
Reported-by: Paweł Sikora <pluto@...k.net>
Liked-by: Gergely Nagy <algernon@...house-project.org>
Signed-off-by: Jonathan Nieder <jrnieder@...il.com>
---
Hi,
Nothing urgent about this, but it seems to be a frequently[1] reported[2]
source of unnecessary worry. Thoughts?
[1] http://thread.gmane.org/gmane.linux.kernel/1145040
[2] http://thread.gmane.org/gmane.linux.kernel/1153808
Context: http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=32;bug=636501
kernel/printk.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/printk.c b/kernel/printk.c
index 37dff342..db64c951 100644
--- a/kernel/printk.c
+++ b/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;
}
--
1.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists