summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Huang <henry.huang@mediatek.com>2020-03-11 16:27:01 +0800
committerGerrit Code Review <gerrit@mediatek.com>2020-03-11 16:27:01 +0800
commit0798bcf47bb0fb9796548032b0766f6444798a91 (patch)
treeabd37ddc42be20fd003a26df7b37933da4574c36
parent03b513e734fccdf76920a46db91eaa4955f975d6 (diff)
parent97d3a8c84177c7b3886096d83ebae96b5d712aab (diff)
downloadwembley-sepolicy-0798bcf47bb0fb9796548032b0766f6444798a91.tar.gz
Merge "[ALPS05003224] thermal hal service sepolicy" into alps-trunk-r0.mssi
-rw-r--r--non_plat/file_contexts1
-rw-r--r--non_plat/hal_thermal_default.te8
2 files changed, 9 insertions, 0 deletions
diff --git a/non_plat/file_contexts b/non_plat/file_contexts
index d3618b8..051b949 100644
--- a/non_plat/file_contexts
+++ b/non_plat/file_contexts
@@ -537,6 +537,7 @@
/(system\/vendor|vendor)/bin/slpd u:object_r:slpd_exec:s0
/(system\/vendor|vendor)/bin/thermal_manager u:object_r:thermal_manager_exec:s0
/(system\/vendor|vendor)/bin/thermalloadalgod u:object_r:thermalloadalgod_exec:s0
+/(system\/vendor|vendor)/bin/hw/android\.hardware\.thermal@2\.0-service\.mtk u:object_r:hal_thermal_default_exec:s0
/(system\/vendor|vendor)/bin/lbs_hidl_service u:object_r:lbs_hidl_service_exec:s0
/(system\/vendor|vendor)/bin/meta_tst u:object_r:meta_tst_exec:s0
/(system\/vendor|vendor)/bin/kisd u:object_r:kisd_exec:s0
diff --git a/non_plat/hal_thermal_default.te b/non_plat/hal_thermal_default.te
index 2a648fb..50e069c 100644
--- a/non_plat/hal_thermal_default.te
+++ b/non_plat/hal_thermal_default.te
@@ -6,3 +6,11 @@
allow hal_thermal_default proc_mtktz:dir search;
allow hal_thermal_default proc_mtktz:file {open read getattr};
allow hal_thermal_default proc_stat:file {open read getattr };
+
+#for uevent handle
+allow hal_thermal_default self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
+
+#for thermal sysfs
+allow hal_thermal_default sysfs_therm:file w_file_perms;
+allow hal_thermal_default sysfs_therm:file r_file_perms;
+allow hal_thermal_default sysfs_therm:dir search; \ No newline at end of file