lkml.org 
[lkml]   [2013]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: SELinux change in 3.13 causes sync hang
From
Date
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;



\
 
 \ /
  Last update: 2013-12-11 02:21    [W:0.060 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site