summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Wang <wvw@google.com>2019-11-22 10:53:02 -0800
committerandroid-build-merger <android-build-merger@google.com>2019-11-22 10:53:02 -0800
commitd1c3b3c146cc0d4b8ae6b9a326c94fb48d4f2bb8 (patch)
treec686364b112568c3661026b338133878220886a7
parenta319345a78871c3a972c4c92ca96bdd691053f5b (diff)
parent2705222933b467bf7e97eaf73f44798d956c0c84 (diff)
downloadbonito-sepolicy-temp_b_145570283.tar.gz
Add sepolicy for thermal log daemontemp_b_145570283
am: 2705222933 Change-Id: I4955c2bcb339ad7a34c77f295af6eadfd92537d6
-rw-r--r--vendor/google/file_contexts1
-rw-r--r--vendor/google/init-thermal-logging.sh.te10
2 files changed, 11 insertions, 0 deletions
diff --git a/vendor/google/file_contexts b/vendor/google/file_contexts
index 99579844..2ce56a4c 100644
--- a/vendor/google/file_contexts
+++ b/vendor/google/file_contexts
@@ -18,6 +18,7 @@
/vendor/bin/perfstatsd u:object_r:perfstatsd_exec:s0
/vendor/bin/init\.firstboot\.sh u:object_r:init-firstboot_exec:s0
/vendor/bin/init\.fingerprint\.sh u:object_r:init-fingerprint_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/pixelstats-vendor u:object_r:pixelstats_vendor_exec:s0
diff --git a/vendor/google/init-thermal-logging.sh.te b/vendor/google/init-thermal-logging.sh.te
new file mode 100644
index 00000000..3da540e3
--- /dev/null
+++ b/vendor/google/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;
+')