mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kees Cook <kees.cook@canonical.com>
To: "Serge E. Hallyn" <serge.hallyn@canonical.com>
Cc: Eric Paris <eparis@redhat.com>,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	torvalds@linux-foundation.org, joe@perches.com,
	drosenberg@vsecurity.com, mingo@elte.hu, eugeneteo@kernel.org,
	akpm@linux-foundation.org, jmorris@namei.org, morgan@kernel.org,
	casey@schaufler-ca.com
Subject: Re: [PATCH] capabilities/syslog: open code cap_syslog logic to fix build failure
Date: Thu, 18 Nov 2010 12:08:38 -0800	[thread overview]
Message-ID: <20101118200838.GH13854@outflux.net> (raw)
In-Reply-To: <20101118142624.GA927@hallyn.com>

Hi Serge,

On Thu, Nov 18, 2010 at 08:26:24AM -0600, Serge E. Hallyn wrote:
> Quoting Eric Paris (eparis@redhat.com):
> > @@ -274,7 +274,20 @@ int do_syslog(int type, char __user *buf, int len, bool from_file)
> >  	char c;
> >  	int error = 0;
> >  
> > -	error = security_syslog(type, from_file);
> > +	/*
> > +	 * If this is from /proc/kmsg we only do the capabilities checks
> > +	 * at open time.
> > +	 */
> > +	if (type == SYSLOG_ACTION_OPEN || !from_file) {
> > +		if (dmesg_restrict && !capable(CAP_SYS_ADMIN))
> 
> Any chance we could introduce a new capability for this?

Wasn't there talk of creating CAP_SYSLOG or something? Right now most
sysklogd implementations are just starting life as root, so making this
change now shouldn't break anyone.

-Kees

-- 
Kees Cook
Ubuntu Security Team

  reply	other threads:[~2010-11-18 20:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15 23:36 Eric Paris
2010-11-16 11:58 ` Casey Schaufler
2010-11-16 15:54 ` Kees Cook
2010-11-18 14:26 ` Serge E. Hallyn
2010-11-18 20:08   ` Kees Cook [this message]
2010-11-18 22:21     ` Serge Hallyn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101118200838.GH13854@outflux.net \
    --to=kees.cook@canonical.com \
    --cc=akpm@linux-foundation.org \
    --cc=casey@schaufler-ca.com \
    --cc=drosenberg@vsecurity.com \
    --cc=eparis@redhat.com \
    --cc=eugeneteo@kernel.org \
    --cc=jmorris@namei.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=morgan@kernel.org \
    --cc=serge.hallyn@canonical.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®