From: Paul Moore <pmoore@redhat.com>
To: Eric Paris <eparis@redhat.com>, Stephen Smalley <sds@tycho.nsa.gov>
Cc: selinux@tycho.nsa.gov
Subject: Re: [PATCH] selinux: correctly label /proc inodes in use before the policy is loaded
Date: Wed, 05 Mar 2014 14:26:34 -0500 [thread overview]
Message-ID: <1821968.ne38jZ0Fly@sifl> (raw)
In-Reply-To: <1394044822.4862.1.camel@flatline.rdu.redhat.com>
On Wednesday, March 05, 2014 01:40:22 PM Eric Paris wrote:
> On Wed, 2014-03-05 at 12:31 -0500, Stephen Smalley wrote:
> > On 03/05/2014 11:44 AM, Paul Moore wrote:
> > > diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> > > index 57b0b49..d554e7e 100644
> > > --- a/security/selinux/hooks.c
> > > +++ b/security/selinux/hooks.c
> > > @@ -1419,15 +1419,32 @@ static int inode_doinit_with_dentry(struct inode
> > > *inode, struct dentry *opt_dent> >
> > > isec->sid = sbsec->sid;
> > >
> > > if ((sbsec->flags & SE_SBPROC) && !S_ISLNK(inode->i_mode)) {
> > >
> > > - if (opt_dentry) {
> > > - isec->sclass = inode_mode_to_security_class(inode-
>i_mode);
> > > - rc = selinux_proc_get_sid(opt_dentry,
> > > - isec->sclass,
> > > - &sid);
> > > - if (rc)
> > > - goto out_unlock;
> > > - isec->sid = sid;
> > > - }
> > > + /* Need a dentry, since the procfs API requires one. */
> >
> > Comment isn't accurate; unlike the xattr case where the dentry
> > requirement originates from the ->getxattr API, here we need a dentry
> > for our own internal selinux_proc_get_sid() helper. Otherwise, looks
> > fine.
>
> I guess I could have written that comment better...
>
> /* We must have a dentry to determine the label on procfs inodes */
>
> With a comment change like that
>
> Acked-by: Eric Paris <eparis@redhat.com>
Updated. I'll push it to next later today.
--
paul moore
security and virtualization @ redhat
prev parent reply other threads:[~2014-03-05 19:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-05 16:44 [PATCH] selinux: correctly label /proc inodes in use before the policy is loaded Paul Moore
2014-03-05 17:31 ` Stephen Smalley
2014-03-05 18:40 ` Eric Paris
2014-03-05 19:26 ` Paul Moore [this message]
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=1821968.ne38jZ0Fly@sifl \
--to=pmoore@redhat.com \
--cc=eparis@redhat.com \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
/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.