From: Eric Paris <eparis@redhat.com>
To: Josh Boyer <jwboyer@fedoraproject.org>
Cc: Anand Avati <avati@redhat.com>, James Morris <jmorris@namei.org>,
Eric Sandeen <sandeen@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>
Subject: Re: SELinux change in 3.13 causes sync hang
Date: Tue, 10 Dec 2013 15:35:44 -0500 [thread overview]
Message-ID: <1386707744.23829.25.camel@flatline.rdu.redhat.com> (raw)
In-Reply-To: <1386707123.23829.23.camel@flatline.rdu.redhat.com>
On Tue, 2013-12-10 at 15:25 -0500, Eric Paris wrote:
> I'll try to write a patch to fix that logic...
Anand,
How about something like (untested but it compiles):
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index ee470a0..2b437fc8 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -2349,9 +2359,17 @@ int security_fs_use(struct super_block *sb)
if (strncmp(fstype, c->u.name, baselen))
continue;
- /* if there is no subtype, this is the one! */
- if (!subtype)
- break;
+ /* current mount has no subtype */
+ if (!subtype) {
+ /*
+ * if there is no subtype in policy this is our match
+ * if there is a subtype in policy keep looking,
+ */
+ if (baselen == strlen(c->u.name))
+ break;
+ else
+ continue;
+ }
/* skip past the base in this entry */
sub = c->u.name + baselen;
next prev parent reply other threads:[~2013-12-10 20:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 20:06 Josh Boyer
2013-12-10 20:11 ` Eric Paris
2013-12-10 20:25 ` Eric Paris
2013-12-10 20:35 ` Eric Paris [this message]
2013-12-10 21:58 ` Anand Avati
2013-12-10 22:00 ` Eric Paris
2013-12-10 21:38 ` Josh Boyer
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=1386707744.23829.25.camel@flatline.rdu.redhat.com \
--to=eparis@redhat.com \
--cc=avati@redhat.com \
--cc=jmorris@namei.org \
--cc=jwboyer@fedoraproject.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sandeen@redhat.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®