diff options
Diffstat (limited to 'security/selinux')
-rw-r--r-- | security/selinux/hooks.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index c253caa90bb4..87a915656eab 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -401,23 +401,14 @@ static int selinux_is_sblabel_mnt(struct super_block *sb) | |||
401 | { | 401 | { |
402 | struct superblock_security_struct *sbsec = sb->s_security; | 402 | struct superblock_security_struct *sbsec = sb->s_security; |
403 | 403 | ||
404 | if (sbsec->behavior == SECURITY_FS_USE_XATTR || | 404 | return sbsec->behavior == SECURITY_FS_USE_XATTR || |
405 | sbsec->behavior == SECURITY_FS_USE_TRANS || | 405 | sbsec->behavior == SECURITY_FS_USE_TRANS || |
406 | sbsec->behavior == SECURITY_FS_USE_TASK) | 406 | sbsec->behavior == SECURITY_FS_USE_TASK || |
407 | return 1; | 407 | /* Special handling. Genfs but also in-core setxattr handler */ |
408 | 408 | !strcmp(sb->s_type->name, "sysfs") || | |
409 | /* Special handling for sysfs. Is genfs but also has setxattr handler*/ | 409 | !strcmp(sb->s_type->name, "pstore") || |
410 | if (strncmp(sb->s_type->name, "sysfs", sizeof("sysfs")) == 0) | 410 | !strcmp(sb->s_type->name, "debugfs") || |
411 | return 1; | 411 | !strcmp(sb->s_type->name, "rootfs"); |
412 | |||
413 | /* | ||
414 | * Special handling for rootfs. Is genfs but supports | ||
415 | * setting SELinux context on in-core inodes. | ||
416 | */ | ||
417 | if (strncmp(sb->s_type->name, "rootfs", sizeof("rootfs")) == 0) | ||
418 | return 1; | ||
419 | |||
420 | return 0; | ||
421 | } | 412 | } |
422 | 413 | ||
423 | static int sb_finish_set_opts(struct super_block *sb) | 414 | static int sb_finish_set_opts(struct super_block *sb) |