summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorHridya Valsaraju <hridya@google.com>2020-01-06 10:13:29 -0800
committerPaul Moore <paul@paul-moore.com>2020-01-06 21:11:18 -0500
commit7a4b51947475a7f67e2bd06c4a4c768e2e64a975 (patch)
tree07b41cf709869e76978020c22b57116debe01b80 /security
parent7e78c875143b639dca887e335f7d045480ec28d8 (diff)
downloadlinux-7a4b51947475a7f67e2bd06c4a4c768e2e64a975.tar.bz2
selinux: allow per-file labelling for binderfs
This patch allows genfscon per-file labeling for binderfs. This is required to have separate permissions to allow access to binder, hwbinder and vndbinder devices which are relocating to binderfs. Acked-by: Jeff Vander Stoep <jeffv@google.com> Acked-by: Mark Salyzyn <salyzyn@android.com> Signed-off-by: Hridya Valsaraju <hridya@google.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/hooks.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 659c4a81e897..63a6e36abe9f 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -752,6 +752,7 @@ static int selinux_set_mnt_opts(struct super_block *sb,
if (!strcmp(sb->s_type->name, "debugfs") ||
!strcmp(sb->s_type->name, "tracefs") ||
+ !strcmp(sb->s_type->name, "binderfs") ||
!strcmp(sb->s_type->name, "pstore"))
sbsec->flags |= SE_SBGENFS;