From 82860bfe6362c08c61d11fd5b2e1b4390bdfdcd0 Mon Sep 17 00:00:00 2001 From: Xiang Wang Date: Thu, 2 Feb 2023 14:57:10 -0800 Subject: [PATCH] Allow battery_mitigation to use Binder IPC This is to resolve the following local error when testing with Thermal AIDL service enabled: auditd : type=1400 audit(0.0:4): avc: denied { call } for comm="servicemanager" scontext=u:r:servicemanager:s0 tcontext=u:r:battery_mitigation:s0 tclass=binder permissive=0 Bug: b/264595820 Test: pts-tradefed run pts -m PtsSELinuxTest Change-Id: I825ed2b644360e695081fe06489fabf3feb913bd --- battery_mitigation/sepolicy/battery_mitigation.te | 3 +++ 1 file changed, 3 insertions(+) diff --git a/battery_mitigation/sepolicy/battery_mitigation.te b/battery_mitigation/sepolicy/battery_mitigation.te index ff34c43..354fe89 100644 --- a/battery_mitigation/sepolicy/battery_mitigation.te +++ b/battery_mitigation/sepolicy/battery_mitigation.te @@ -20,3 +20,6 @@ allow battery_mitigation sysfs_bcl:lnk_file r_file_perms; allow battery_mitigation sysfs_thermal:lnk_file r_file_perms; allow battery_mitigation mitigation_vendor_data_file:dir rw_dir_perms; allow battery_mitigation mitigation_vendor_data_file:file create_file_perms; + +# Allow battery_mitigation to use Binder IPC so that service manager can notify it for callbacks +binder_use(battery_mitigation) \ No newline at end of file