public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serge.hallyn@canonical.com>
To: Eric Paris <eparis@redhat.com>
Cc: 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,
	kees.cook@canonical.com, 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 08:26:24 -0600	[thread overview]
Message-ID: <20101118142624.GA927@hallyn.com> (raw)
In-Reply-To: <20101115233628.6288.2303.stgit@paris.rdu.redhat.com>

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?

thanks,
-serge

  parent reply	other threads:[~2010-11-18 14:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15 23:36 [PATCH] capabilities/syslog: open code cap_syslog logic to fix build failure Eric Paris
2010-11-16 11:58 ` Casey Schaufler
2010-11-16 15:54 ` Kees Cook
2010-11-18 14:26 ` Serge E. Hallyn [this message]
2010-11-18 20:08   ` Kees Cook
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=20101118142624.GA927@hallyn.com \
    --to=serge.hallyn@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=kees.cook@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=morgan@kernel.org \
    --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