From 8a6bbb1ffef3c6540b8752bfb9de93fcc37c33f8 Mon Sep 17 00:00:00 2001
From: Polina Bondarenko <pbond@google.com>
Date: Fri, 12 Feb 2016 20:21:06 +0100
Subject: [PATCH] Allow gatekeeper to find hardwareproperties service.

Bug: 26945055
Change-Id: I5745d02be9889f6a0e02de12bd8d8f2808de9ce0
---
 gatekeeperd.te   | 3 +++
 service.te       | 1 +
 service_contexts | 1 +
 3 files changed, 5 insertions(+)

diff --git a/gatekeeperd.te b/gatekeeperd.te
index 81d7fdf6d..051daca69 100644
--- a/gatekeeperd.te
+++ b/gatekeeperd.te
@@ -24,4 +24,7 @@ allow gatekeeperd user_service:service_manager find;
 allow gatekeeperd gatekeeper_data_file:dir rw_dir_perms;
 allow gatekeeperd gatekeeper_data_file:file create_file_perms;
 
+# For hardware properties retrieval
+allow gatekeeperd hardwareproperties_service:service_manager find;
+
 neverallow { domain -gatekeeperd } gatekeeper_service:service_manager add;
diff --git a/service.te b/service.te
index 34bd50a95..ae7dcd7c6 100644
--- a/service.te
+++ b/service.te
@@ -54,6 +54,7 @@ type fingerprint_service, app_api_service, system_server_service, service_manage
 type gfxinfo_service, system_api_service, system_server_service, service_manager_type;
 type graphicsstats_service, app_api_service, system_server_service, service_manager_type;
 type hardware_service, system_server_service, service_manager_type;
+type hardwareproperties_service, app_api_service, system_server_service, service_manager_type;
 type hdmi_control_service, system_api_service, system_server_service, service_manager_type;
 type input_method_service, app_api_service, system_server_service, service_manager_type;
 type input_service, app_api_service, system_server_service, service_manager_type;
diff --git a/service_contexts b/service_contexts
index 39e004c3a..1d18a603a 100644
--- a/service_contexts
+++ b/service_contexts
@@ -44,6 +44,7 @@ android.hardware.fingerprint.IFingerprintDaemon u:object_r:fingerprintd_service:
 gfxinfo                                   u:object_r:gfxinfo_service:s0
 graphicsstats                             u:object_r:graphicsstats_service:s0
 hardware                                  u:object_r:hardware_service:s0
+hardwareproperties                        u:object_r:hardwareproperties_service:s0
 hdmi_control                              u:object_r:hdmi_control_service:s0
 inputflinger                              u:object_r:inputflinger_service:s0
 input_method                              u:object_r:input_method_service:s0
-- 
GitLab