ANDROID: quick selinux support for tracefs
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
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Bug: None
Patchset: selinux-tracefs
Signed-off-by: Mattias Nissler <mnissler@google.com>
Change-Id: I141d016ea4931911414ae8555afc8f3d76f8fcfb
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 9b0586d..94a0bfc 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -420,6 +420,7 @@
!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");
}