OSDN Git Service

selinux: enable genfscon labeling for sysfs and pstore files
[uclinux-h8/linux.git] / security / selinux / hooks.c
index ec39b9a..daf59b4 100644 (file)
@@ -726,7 +726,9 @@ static int selinux_set_mnt_opts(struct super_block *sb,
        if (strcmp(sb->s_type->name, "proc") == 0)
                sbsec->flags |= SE_SBPROC | SE_SBGENFS;
 
-       if (strcmp(sb->s_type->name, "debugfs") == 0)
+       if (!strcmp(sb->s_type->name, "debugfs") ||
+           !strcmp(sb->s_type->name, "sysfs") ||
+           !strcmp(sb->s_type->name, "pstore"))
                sbsec->flags |= SE_SBGENFS;
 
        if (!sbsec->behavior) {