thermal: move thermal selinux policy to Pixel-wide common
Bug: 146390555
Test: No avc denied and thermal_logd can print when thermal-hal ativates
Change-Id: I974d67866d48aad40ce5bed2715fd0e8f078c61f
diff --git a/thermal/init-thermal-logging.sh.te b/thermal/init-thermal-logging.sh.te
new file mode 100644
index 0000000..3da540e
--- /dev/null
+++ b/thermal/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;
+')