mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
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 6a3911837d)
Change-Id: I98ad8c829302346705c1abcdc8f019f479fdefb6
Bug: 62413700
This commit is contained in:
parent
af0f86d1d7
commit
afd012a6a0
|
|
@ -740,6 +740,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 New Issue
Block a user