From b1ec3dfacd604296b89df34050e2812133906d28 Mon Sep 17 00:00:00 2001
From: Riley Spahn <rileyspahn@google.com>
Date: Tue, 1 Jul 2014 08:38:56 -0700
Subject: [PATCH] Add imms service and system_app_service type.

Map imms to system_app_service in service_contexts and add
the system_app_service type and allow system_app to add the
system_app_service.

Bug: 16005467
Change-Id: I06ca75e2602f083297ed44960767df2e78991140
---
 service.te       | 1 +
 service_contexts | 1 +
 system_app.te    | 2 ++
 3 files changed, 4 insertions(+)

diff --git a/service.te b/service.te
index c085c79a6..ca461f170 100644
--- a/service.te
+++ b/service.te
@@ -8,4 +8,5 @@ type mediaserver_service,       service_manager_type;
 type nfc_service,               service_manager_type;
 type radio_service,             service_manager_type;
 type surfaceflinger_service,    service_manager_type;
+type system_app_service,        service_manager_type;
 type system_server_service,     service_manager_type;
diff --git a/service_contexts b/service_contexts
index 843d6acf7..0f4212b56 100644
--- a/service_contexts
+++ b/service_contexts
@@ -46,6 +46,7 @@ iphonesubinfo_msim                        u:object_r:radio_service:s0
 iphonesubinfo2                            u:object_r:radio_service:s0
 iphonesubinfo                             u:object_r:radio_service:s0
 ims                                       u:object_r:radio_service:s0
+imms                                      u:object_r:system_app_service:s0
 isms_msim                                 u:object_r:radio_service:s0
 isms2                                     u:object_r:radio_service:s0
 isms                                      u:object_r:radio_service:s0
diff --git a/system_app.te b/system_app.te
index 324d74ee6..bada9051b 100644
--- a/system_app.te
+++ b/system_app.te
@@ -42,6 +42,8 @@ allow system_app logd_prop:property_service set;
 allow system_app anr_data_file:dir ra_dir_perms;
 allow system_app anr_data_file:file create_file_perms;
 
+allow system_app system_app_service:service_manager add;
+
 allow system_app keystore:keystore_key {
 	test
 	get
-- 
GitLab