summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMingguang Xu <mingguangxu@google.com>2023-02-09 04:45:28 +0000
committerMingguang Xu <mingguangxu@google.com>2023-03-23 23:38:37 +0000
commit6cda9894812f25aa9bd06660456788d60d9fbe1d (patch)
tree35ba0007031ae6b589449cefb43439eac5622b96
parent651913a1ea36e2d0b32aed234d0a177aeb71f6c6 (diff)
downloadpixel-sepolicy-6cda9894812f25aa9bd06660456788d60d9fbe1d.tar.gz
Add new IGrilAntennaTuningSerive interface to twoshay
Fixed denial: SELinux : avc: denied { add } for pid=911 uid=0 name=com.google.input.algos.gril.IGrilAntennaTuningService/default scontext=u:r:twoshay:s0 tcontext=u:object_r:default_android_service:s0 tclass=service_manager permissive=0 Bug: 267529399 Test: boot, see no denials Change-Id: I7278e0b9ee7c72231e654e1d35042587fe6faa54 Signed-off-by: Mingguang Xu <mingguangxu@google.com>
-rw-r--r--input/platform_app.te1
-rw-r--r--input/service.te1
-rw-r--r--input/service_contexts1
-rw-r--r--input/twoshay.te1
4 files changed, 4 insertions, 0 deletions
diff --git a/input/platform_app.te b/input/platform_app.te
index 17cc511..2d47236 100644
--- a/input/platform_app.te
+++ b/input/platform_app.te
@@ -1,2 +1,3 @@
allow platform_app touch_context_service:service_manager find;
+allow platform_app gril_antenna_tuning_service:service_manager find;
binder_call(platform_app, twoshay)
diff --git a/input/service.te b/input/service.te
index 989cd1b..d521666 100644
--- a/input/service.te
+++ b/input/service.te
@@ -1 +1,2 @@
+type gril_antenna_tuning_service, service_manager_type, hal_service_type;
type touch_context_service, service_manager_type, hal_service_type;
diff --git a/input/service_contexts b/input/service_contexts
index 95e70f8..ed69aef 100644
--- a/input/service_contexts
+++ b/input/service_contexts
@@ -1 +1,2 @@
+com.google.input.algos.gril.IGrilAntennaTuningService/default u:object_r:gril_antenna_tuning_service:s0
com.google.input.ITouchContextService/default u:object_r:touch_context_service:s0
diff --git a/input/twoshay.te b/input/twoshay.te
index 0511f3d..3d48318 100644
--- a/input/twoshay.te
+++ b/input/twoshay.te
@@ -8,6 +8,7 @@ allow twoshay twoshay:capability sys_nice;
binder_use(twoshay)
add_service(twoshay, touch_context_service)
+add_service(twoshay, gril_antenna_tuning_service)
binder_call(twoshay, platform_app)
allow twoshay fwk_stats_service:service_manager find;