mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
selinux: enable genfscon labeling for tracefs
In kernel version 4.1, tracefs was separated from debugfs into its own filesystem. Prior to this split, files in /sys/kernel/debug/tracing could be labeled during filesystem creation using genfscon or later from userspace using setxattr. This change re-enables support for genfscon labeling. Signed-off-by: Jeff Vander Stoep <[email protected]> Acked-by: Stephen Smalley <[email protected]> Signed-off-by: Paul Moore <[email protected]>
This commit is contained in:
parent
0b4d3452b8
commit
6a3911837d
1 changed files with 1 additions and 0 deletions
|
|
@ -813,6 +813,7 @@ static int selinux_set_mnt_opts(struct super_block *sb,
|
|||
sbsec->flags |= SE_SBPROC | SE_SBGENFS;
|
||||
|
||||
if (!strcmp(sb->s_type->name, "debugfs") ||
|
||||
!strcmp(sb->s_type->name, "tracefs") ||
|
||||
!strcmp(sb->s_type->name, "sysfs") ||
|
||||
!strcmp(sb->s_type->name, "pstore"))
|
||||
sbsec->flags |= SE_SBGENFS;
|
||||
|
|
|
|||
Loading…
Reference in a new issue