From 722249b3e83dba446a93ace95d211f874c424737 Mon Sep 17 00:00:00 2001
From: pkanwar <pkanwar@google.com>
Date: Sun, 21 May 2017 16:49:37 -0700
Subject: [PATCH] SE Policy for Tether Offload HAL

Update SE Policy to allow calls to and callbacks for the Tether Offload HAL
HIDL binderized service.

Bug: 38417260
Test: New functionality. So we don't have any tests.
Change-Id: I2c95b290523c55c081afa1bca091f368559c9125
---
 private/system_server.te    | 1 +
 public/attributes           | 3 +++
 public/hal_tetheroffload.te | 3 +++
 3 files changed, 7 insertions(+)
 create mode 100644 public/hal_tetheroffload.te

diff --git a/private/system_server.te b/private/system_server.te
index c5185fbda..022618610 100644
--- a/private/system_server.te
+++ b/private/system_server.te
@@ -186,6 +186,7 @@ allow system_server hal_omx_hwservice:hwservice_manager find;
 allow system_server hidl_token_hwservice:hwservice_manager find;
 hal_client_domain(system_server, hal_power)
 hal_client_domain(system_server, hal_sensors)
+hal_client_domain(system_server, hal_tetheroffload)
 hal_client_domain(system_server, hal_thermal)
 hal_client_domain(system_server, hal_tv_cec)
 hal_client_domain(system_server, hal_tv_input)
diff --git a/public/attributes b/public/attributes
index c0b4646a0..6df62c9e0 100644
--- a/public/attributes
+++ b/public/attributes
@@ -234,6 +234,9 @@ attribute hal_sensors_server;
 attribute hal_telephony;
 attribute hal_telephony_client;
 attribute hal_telephony_server;
+attribute hal_tetheroffload;
+attribute hal_tetheroffload_client;
+attribute hal_tetheroffload_server;
 attribute hal_thermal;
 attribute hal_thermal_client;
 attribute hal_thermal_server;
diff --git a/public/hal_tetheroffload.te b/public/hal_tetheroffload.te
new file mode 100644
index 000000000..a4c21fcdf
--- /dev/null
+++ b/public/hal_tetheroffload.te
@@ -0,0 +1,3 @@
+## HwBinder IPC from client to server, and callbacks
+binder_call(hal_tetheroffload_client, hal_tetheroffload_server)
+binder_call(hal_tetheroffload_server, hal_tetheroffload_client)
-- 
GitLab