diff options
author | Jeff Vander Stoep <jeffv@google.com> | 2017-06-20 18:35:33 +0200 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2017-06-20 21:53:34 +0200 |
commit | 6a3911837da0a90ed599fd0a9836472f5e7ddf1b (patch) | |
tree | 603ab97d952ed13beb9beb40fcc7163f3a6a3337 /security/selinux | |
parent | security/selinux: allow security_sb_clone_mnt_opts to enable/disable native l... (diff) | |
download | linux-6a3911837da0a90ed599fd0a9836472f5e7ddf1b.tar.xz linux-6a3911837da0a90ed599fd0a9836472f5e7ddf1b.zip |
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 <jeffv@google.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux')
-rw-r--r-- | security/selinux/hooks.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 9cc042df10d1..3a06afbd2f6f 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -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; |