]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
selinux: allow per-file labelling for binderfs
authorHridya Valsaraju <hridya@google.com>
Mon, 6 Jan 2020 18:13:29 +0000 (10:13 -0800)
committerPaul Moore <paul@paul-moore.com>
Tue, 7 Jan 2020 02:11:18 +0000 (21:11 -0500)
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>
security/selinux/hooks.c

index 659c4a81e89768eeab44050becc0a7b9e4872a97..63a6e36abe9ff10b19f2c85081e5e0a1afd4627d 100644 (file)
@@ -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;