All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David P. Quigley" <dpquigl@tycho.nsa.gov>
To: James Morris <jmorris@namei.org>
Cc: auke-jan.h.kok@intel.com, e1000-devel@lists.sourceforge.net,
	netdev@vger.kernel.org, Alexey Dobriyan <adobriyan@gmail.com>,
	Chris Wright <chrisw@sous-sol.org>,
	linux-security-module@vger.kernel.org,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Al Viro <viro@ftp.linux.org.uk>,
	Eric Paris <eparis@parisplace.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Stephen Smalley <sds@tycho.nsa.gov>,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH 1/3][RFC] SELinux: correctly detect proc filesystems of	the form "proc/foo"
Date: Fri, 19 Dec 2008 07:29:33 -0500	[thread overview]
Message-ID: <1229689773.31766.30.camel@moss-terrapins.epoch.ncsc.mil> (raw)
In-Reply-To: <alpine.LRH.1.10.0812191204390.4137@tundra.namei.org>

On Fri, 2008-12-19 at 12:05 +1100, James Morris wrote:
> From: Stephen Smalley <sds@tycho.nsa.gov>
> 
> Map all of these proc/ filesystem types to "proc" for the policy lookup at
> filesystem mount time.
> 
> Signed-off-by: James Morris <jmorris@namei.org>
> ---
>  security/selinux/hooks.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index d337748..470763a 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -672,7 +672,7 @@ static int selinux_set_mnt_opts(struct super_block *sb,
>  		sbsec->proc = 1;
>  
>  	/* Determine the labeling behavior to use for this filesystem type. */
> -	rc = security_fs_use(sb->s_type->name, &sbsec->behavior, &sbsec->sid);
> +	rc = security_fs_use(sbsec->proc ? "proc" : sb->s_type->name, &sbsec->behavior, &sbsec->sid);
>  	if (rc) {
>  		printk(KERN_WARNING "%s: security_fs_use(%s) returned %d\n",
>  		       __func__, sb->s_type->name, rc);

I'm  not sure if you took the patches I sent out for condensing the
flags and adding a /proc/mount notification for label support but if you
did then your patches haven't been updated to use them. sbsec->proc
should no longer exist and instead it should be sbsec->flags &
SE_SBPROC.

Dave


------------------------------------------------------------------------------

  reply	other threads:[~2008-12-19 12:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-04  1:18 networking probs in next-20081203 Andrew Morton
2008-12-04 15:14 ` Alexey Dobriyan
2008-12-04 17:41   ` Kok, Auke
2008-12-04 17:52     ` Alexey Dobriyan
2008-12-04 18:11       ` [E1000-devel] " Stephen Smalley
2008-12-04 18:21         ` David Miller
2008-12-04 19:32           ` Stephen Smalley
2008-12-04 20:06             ` Stephen Smalley
2008-12-04 21:00               ` [E1000-devel] " Eric W. Biederman
2008-12-05  2:03                 ` James Morris
2008-12-05  7:49                   ` Eric W. Biederman
2008-12-05 14:12                 ` Stephen Smalley
2008-12-11 10:41                   ` James Morris
2008-12-12  5:24                     ` Alexey Dobriyan
2008-12-12  9:26                       ` James Morris
2008-12-12  9:29                         ` James Morris
2008-12-12 10:51                           ` Eric W. Biederman
2008-12-12 21:40                             ` [E1000-devel] " James Morris
2008-12-12 21:24                         ` Stephen Smalley
2008-12-15 13:28                           ` James Morris
2008-12-19  1:04                             ` [PATCH 0/3][RFC] Fix security and SELinux handling of proc/* filesystems James Morris
2008-12-19  1:05                               ` [PATCH 1/3][RFC] SELinux: correctly detect proc filesystems of the form "proc/foo" James Morris
2008-12-19 12:29                                 ` David P. Quigley [this message]
2008-12-19  1:06                               ` [PATCH 2/3][RFC] security: pass mount flags to security_sb_kern_mount() James Morris
2008-12-19 12:52                                 ` Stephen Smalley
2008-12-19  1:07                               ` [PATCH 3/3][RFC] SELinux: don't check permissions for kernel mounts James Morris
2008-12-19 12:52                                 ` Stephen Smalley
2008-12-19  6:40                               ` [PATCH 0/3][RFC] Fix security and SELinux handling of proc/* filesystems David Miller

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=1229689773.31766.30.camel@moss-terrapins.epoch.ncsc.mil \
    --to=dpquigl@tycho.nsa.gov \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=auke-jan.h.kok@intel.com \
    --cc=chrisw@sous-sol.org \
    --cc=davem@davemloft.net \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=ebiederm@xmission.com \
    --cc=eparis@parisplace.org \
    --cc=jmorris@namei.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sds@tycho.nsa.gov \
    --cc=viro@ftp.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.