Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d794c27 authored by Hridya Valsaraju's avatar Hridya Valsaraju
Browse files

FROMLIST: security: 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: default avatarJeff Vander Stoep <jeffv@google.com>
Acked-by: default avatarMark Salyzyn <salyzyn@android.com>
Signed-off-by: default avatarHridya Valsaraju <hridya@google.com>

Bug: 136497735
(cherry picked from commit 7a4b51947475a7f67e2bd06c4a4c768e2e64a975
git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git
master)
Link: https://lore.kernel.org/patchwork/patch/1175776/
Change-Id: I105cc54b30ddd4120dc23a363bddc2f9d00e4dc4
parent 3ccf82e8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -871,6 +871,7 @@ static int selinux_set_mnt_opts(struct super_block *sb,
	    !strcmp(sb->s_type->name, "tracefs") ||
	    !strcmp(sb->s_type->name, "sysfs") ||
	    !strcmp(sb->s_type->name, "pstore") ||
	    !strcmp(sb->s_type->name, "binder") ||
	    !strcmp(sb->s_type->name, "cgroup") ||
	    !strcmp(sb->s_type->name, "cgroup2"))
		sbsec->flags |= SE_SBGENFS;