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: Jeff Vander Stoep <jeffv@google.com>
Acked-by: Mark Salyzyn <salyzyn@android.com>
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Signed-off-by: Sorayukii <sorayukii69@gmail.com>
This commit is contained in:
Hridya Valsaraju 2019-12-08 12:43:44 -08:00 • committed by Sorayukii
commit 96d85d74d1

View file

@ -815,7 +815,8 @@ 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, "bpf"))
!strcmp(sb->s_type->name, "bpf") ||
!strcmp(sb->s_type->name, "binder"))
sbsec->flags |= SE_SBGENFS;
if (!sbsec->behavior) {