diff options
author | Jeff Vander Stoep <jeffv@google.com> | 2017-06-20 09:35:33 -0700 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2017-07-10 16:43:58 +0530 |
commit | f83fb557207250de93aa8882df19acfc7fe7ace7 (patch) | |
tree | a500f3684e13b6c968412d2cc73f76142874ed2b | |
parent | 6bec212418d2f97892479fcfcc00c36d3a6c3f6f (diff) |
UPSTREAM: 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>
(cherry picked from commit 6a3911837da0a90ed599fd0a9836472f5e7ddf1b)
Change-Id: I98ad8c829302346705c1abcdc8f019f479fdefb6
Bug: 62413700
-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 0281b1e1fa6b..c49ed3df3f32 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -735,6 +735,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; |