quick selinux support for tracefs
authorYongqin Liu <yongqin.liu@linaro.org>
Thu, 28 Apr 2016 05:53:36 +0000 (13:53 +0800)
committerAmit Pundir <amit.pundir@linaro.org>
Thu, 19 May 2016 07:05:13 +0000 (12:35 +0530)
Here is just the quick fix for tracefs with selinux.
just add tracefs to the list of whitelisted filesystem
types in selinux_is_sblabel_mnt(), but the right fix would be to
generalize this logic as described in the last item on the todo list,
https://bitbucket.org/seandroid/wiki/wiki/ToDo

Change-Id: I2aa803ccffbcd2802a7287514da7648e6b364157
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
security/selinux/hooks.c

index 9b0586d0f3c41d72aea3230cba87f63e2df59ad2..94a0bfc748d175adbec213a231532e5dc7947bba 100644 (file)
@@ -420,6 +420,7 @@ static int selinux_is_sblabel_mnt(struct super_block *sb)
                !strcmp(sb->s_type->name, "sysfs") ||
                !strcmp(sb->s_type->name, "pstore") ||
                !strcmp(sb->s_type->name, "debugfs") ||
+               !strcmp(sb->s_type->name, "tracefs") ||
                !strcmp(sb->s_type->name, "rootfs");
 }