Messages in this thread | | | Date | Thu, 4 Aug 2011 04:39:05 +0000 | From | "Serge E. Hallyn" <> | Subject | Re: [PATCH/RFC] cap_syslog: make CAP_SYS_ADMIN deprecation notice less alarming |
| |
Quoting Jonathan Nieder (jrnieder@gmail.com): > 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
Sets the taint flag? That's a bit over the top, so:
> 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@charite.de> > Reported-by: Niels <zorglub_olsen@hotmail.com> > Reported-by: Paweł Sikora <pluto@agmk.net> > Liked-by: Gergely Nagy <algernon@madhouse-project.org> > Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
thanks, -serge
> --- > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |