From 7d6185fef955851fc48fd84a3510c9e54b092d77 Mon Sep 17 00:00:00 2001
From: Jeff Vander Stoep <jeffv@google.com>
Date: Thu, 30 Mar 2017 12:58:06 -0700
Subject: [PATCH] runas: Grant access to seapp_contexts_file

Runas/libselinux needs access to seapp_contexts_file to determine
transitions into app domains.

Addresses:
avc: denied { read } for pid=7154 comm="run-as" name="plat_seapp_contexts"
dev="rootfs" ino=9827 scontext=u:r:runas:s0
tcontext=u:object_r:seapp_contexts_file:s0 tclass=file

Bug: 36782586
Test: Marlin policy builds
Change-Id: I0f0e937e56721d458e250d48ce62f80e3694900f
---
 public/runas.te | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/public/runas.te b/public/runas.te
index 19e30e800..046165d4b 100644
--- a/public/runas.te
+++ b/public/runas.te
@@ -23,6 +23,10 @@ selinux_check_context(runas) # validate context
 allow runas self:process setcurrent;
 allow runas non_system_app_set:process dyntransition; # setcon
 
+# runas/libselinux needs access to seapp_contexts_file to
+# determine which domain to transition to.
+allow runas seapp_contexts_file:file r_file_perms;
+
 ###
 ### neverallow rules
 ###
-- 
GitLab