diff options
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 344f4f999681..ca0a1c671f0e 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -387,8 +387,6 @@ static int sb_finish_set_opts(struct super_block *sb) | |||
387 | } | 387 | } |
388 | } | 388 | } |
389 | 389 | ||
390 | sbsec->flags |= (SE_SBINITIALIZED | SBLABEL_MNT); | ||
391 | |||
392 | if (sbsec->behavior > ARRAY_SIZE(labeling_behaviors)) | 390 | if (sbsec->behavior > ARRAY_SIZE(labeling_behaviors)) |
393 | printk(KERN_ERR "SELinux: initialized (dev %s, type %s), unknown behavior\n", | 391 | printk(KERN_ERR "SELinux: initialized (dev %s, type %s), unknown behavior\n", |
394 | sb->s_id, sb->s_type->name); | 392 | sb->s_id, sb->s_type->name); |
@@ -397,11 +395,11 @@ static int sb_finish_set_opts(struct super_block *sb) | |||
397 | sb->s_id, sb->s_type->name, | 395 | sb->s_id, sb->s_type->name, |
398 | labeling_behaviors[sbsec->behavior-1]); | 396 | labeling_behaviors[sbsec->behavior-1]); |
399 | 397 | ||
400 | if (sbsec->behavior == SECURITY_FS_USE_GENFS || | 398 | sbsec->flags |= SE_SBINITIALIZED; |
401 | sbsec->behavior == SECURITY_FS_USE_MNTPOINT || | 399 | if (sbsec->behavior == SECURITY_FS_USE_XATTR || |
402 | sbsec->behavior == SECURITY_FS_USE_NONE || | 400 | sbsec->behavior == SECURITY_FS_USE_TRANS || |
403 | sbsec->behavior > ARRAY_SIZE(labeling_behaviors)) | 401 | sbsec->behavior == SECURITY_FS_USE_TASK) |
404 | sbsec->flags &= ~SBLABEL_MNT; | 402 | sbsec->flags |= SBLABEL_MNT; |
405 | 403 | ||
406 | /* Special handling for sysfs. Is genfs but also has setxattr handler*/ | 404 | /* Special handling for sysfs. Is genfs but also has setxattr handler*/ |
407 | if (strncmp(sb->s_type->name, "sysfs", sizeof("sysfs")) == 0) | 405 | if (strncmp(sb->s_type->name, "sysfs", sizeof("sysfs")) == 0) |