summaryrefslogtreecommitdiff
path: root/sepolicy
diff options
context:
space:
mode:
authorWei Wang <wvw@google.com>2019-11-19 22:45:06 -0800
committerTeYuan Wang <kamewang@google.com>2019-11-21 14:57:36 +0800
commit13191bd626671e2691ab7b68b7d0109d62897a69 (patch)
tree89dc9d25bce92acfda64b3825d263f640fe282e3 /sepolicy
parent74cc9e346d1998db213118a9d91fb55856f3479b (diff)
downloadwahoo-13191bd626671e2691ab7b68b7d0109d62897a69.tar.gz
Add sepolicy for thermal log daemon
Bug: 126562025 Test: Boot and check log Change-Id: I85a6fc0d6cce6b9de174c4402a34b3226c074213 Signed-off-by: TeYuan Wang <kamewang@google.com>
Diffstat (limited to 'sepolicy')
-rw-r--r--sepolicy/vendor/file_contexts1
-rw-r--r--sepolicy/vendor/init-thermal-logging.sh.te10
2 files changed, 11 insertions, 0 deletions
diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts
index bbda5838..c5fcfd98 100644
--- a/sepolicy/vendor/file_contexts
+++ b/sepolicy/vendor/file_contexts
@@ -178,6 +178,7 @@
/vendor/etc/init\.insmod\.cfg u:object_r:init-insmod-sh_exec:s0
/vendor/bin/init\.power\.sh u:object_r:init_power_exec:s0
/vendor/bin/init\.radio\.sh u:object_r:init_radio_exec:s0
+/vendor/bin/thermal_logd u:object_r:init-thermal-logging-sh_exec:s0
/vendor/bin/ramoops u:object_r:ramoops_exec:s0
/vendor/bin/init\.ramoops\.sh u:object_r:ramoops_exec:s0
/vendor/bin/init\.fingerprint\.sh u:object_r:init-fingerprint_exec:s0
diff --git a/sepolicy/vendor/init-thermal-logging.sh.te b/sepolicy/vendor/init-thermal-logging.sh.te
new file mode 100644
index 00000000..3da540e3
--- /dev/null
+++ b/sepolicy/vendor/init-thermal-logging.sh.te
@@ -0,0 +1,10 @@
+type init-thermal-logging-sh, domain;
+type init-thermal-logging-sh_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(init-thermal-logging-sh)
+
+userdebug_or_eng(`
+ allow init-thermal-logging-sh vendor_toolbox_exec:file rx_file_perms;
+ allow init-thermal-logging-sh sysfs_thermal:dir r_dir_perms;
+ allow init-thermal-logging-sh sysfs_thermal:file r_file_perms;
+')