From d152425133a1f38b227eb37896f610163d5994e7 Mon Sep 17 00:00:00 2001
From: Jeff Vander Stoep <jeffv@google.com>
Date: Tue, 21 Feb 2017 20:13:15 -0800
Subject: [PATCH] Allow all untrusted_apps to create ptys

Bug: 35632346
Test: build and boot aosp_marlin
Change-Id: Ia2d019b0160e9b512f3e3a70ded70504fe4fea0c
---
 private/untrusted_app.te     | 4 ++++
 private/untrusted_app_25.te  | 4 ++++
 private/untrusted_app_all.te | 4 ----
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/private/untrusted_app.te b/private/untrusted_app.te
index ead9a16b1..2f4a1a4de 100644
--- a/private/untrusted_app.te
+++ b/private/untrusted_app.te
@@ -21,3 +21,7 @@ app_domain(untrusted_app)
 untrusted_app_domain(untrusted_app)
 net_domain(untrusted_app)
 bluetooth_domain(untrusted_app)
+
+# Allow the allocation and use of ptys
+# Used by: https://play.google.com/store/apps/details?id=jackpal.androidterm
+create_pty(untrusted_app)
diff --git a/private/untrusted_app_25.te b/private/untrusted_app_25.te
index 4f926498c..cba0161c2 100644
--- a/private/untrusted_app_25.te
+++ b/private/untrusted_app_25.te
@@ -24,6 +24,10 @@ untrusted_app_domain(untrusted_app_25)
 net_domain(untrusted_app_25)
 bluetooth_domain(untrusted_app_25)
 
+# Allow the allocation and use of ptys
+# Used by: https://play.google.com/store/apps/details?id=jackpal.androidterm
+create_pty(untrusted_app_25)
+
 # b/34115651 - net.dns* properties read
 # This will go away in a future Android release
 get_prop(untrusted_app_25, net_dns_prop)
diff --git a/private/untrusted_app_all.te b/private/untrusted_app_all.te
index 7d6bee529..0315252b9 100644
--- a/private/untrusted_app_all.te
+++ b/private/untrusted_app_all.te
@@ -17,10 +17,6 @@
 ### seapp_contexts.
 ###
 
-# Allow the allocation and use of ptys
-# Used by: https://play.google.com/store/apps/details?id=jackpal.androidterm
-create_pty(untrusted_app)
-
 # Legacy text relocations
 allow untrusted_app_all apk_data_file:file execmod;
 
-- 
GitLab