From 1847a38b4a9ba668e34a4b8f4414c434aa2096bf Mon Sep 17 00:00:00 2001
From: Yabin Cui <yabinc@google.com>
Date: Mon, 5 Jun 2017 18:20:42 -0700
Subject: [PATCH] Allow run-as to read/write unix_stream_sockets created by
 adbd.

This is to Allow commands like `adb shell run-as ...`.

Bug: http://b/62358246
Test: run commands manually.
Change-Id: I7bb6c79a6e27ff1224a80c6ddeffb7f27f492bb2
---
 public/runas.te | 1 +
 1 file changed, 1 insertion(+)

diff --git a/public/runas.te b/public/runas.te
index 19e30e800..a61f176a9 100644
--- a/public/runas.te
+++ b/public/runas.te
@@ -2,6 +2,7 @@ type runas, domain, domain_deprecated, mlstrustedsubject;
 type runas_exec, exec_type, file_type;
 
 allow runas adbd:process sigchld;
+allow runas adbd:unix_stream_socket { read write };
 allow runas shell:fd use;
 allow runas shell:fifo_file { read write };
 allow runas shell:unix_stream_socket { read write };
-- 
GitLab