From 0e3d831a044b602e97303a5907476389dc33012e Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 21 Jul 2020 16:34:57 +0200 Subject: [PATCH] common: Label thermal nodes and give thermal HAL access Change-Id: I0d27ccbe8cef4247e4655abbbb482ed3cb8a3182 --- common/vendor/genfs_contexts | 2 ++ common/vendor/hal_thermal_default.te | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 common/vendor/hal_thermal_default.te diff --git a/common/vendor/genfs_contexts b/common/vendor/genfs_contexts index 0dcb7d1..68f3cec 100644 --- a/common/vendor/genfs_contexts +++ b/common/vendor/genfs_contexts @@ -15,6 +15,7 @@ genfscon sysfs /class/sec/sensors u:obje genfscon sysfs /class/sec/tsp u:object_r:sysfs_sec_touchscreen:s0 genfscon sysfs /class/sensor_event u:object_r:sysfs_sensors:s0 genfscon sysfs /class/sensors u:object_r:sysfs_sensors:s0 +genfscon sysfs /class/thermal u:object_r:sysfs_thermal:s0 genfscon sysfs /class/timed_output/vibrator/intensity u:object_r:sysfs_vibrator:s0 genfscon sysfs /class/timed_output/vibrator/multi_freq u:object_r:sysfs_vibrator:s0 @@ -39,6 +40,7 @@ genfscon sysfs /devices/virtual/sensors u:obje genfscon sysfs /devices/virtual/sensors/hidden_hole/hh_check_coef u:object_r:sysfs_sensors_writable:s0 genfscon sysfs /devices/virtual/sensors/ssp_sensor/enable u:object_r:sysfs_sensors_writable:s0 genfscon sysfs /devices/virtual/sensors/ssp_sensor/ssp_flush u:object_r:sysfs_sensors_writable:s0 +genfscon sysfs /devices/virtual/thermal u:object_r:sysfs_thermal:s0 genfscon sysfs /devices/virtual/timed_output/vibrator/cp_trigger_index u:object_r:sysfs_vibrator:s0 genfscon sysfs /devices/virtual/timed_output/vibrator/intensity u:object_r:sysfs_vibrator:s0 genfscon sysfs /devices/virtual/timed_output/vibrator/multi_freq u:object_r:sysfs_vibrator:s0 diff --git a/common/vendor/hal_thermal_default.te b/common/vendor/hal_thermal_default.te new file mode 100644 index 0000000..7cd9ba0 --- /dev/null +++ b/common/vendor/hal_thermal_default.te @@ -0,0 +1,8 @@ +# hal_thermal_default.te + +# /acct/tasks +allow hal_thermal_default cgroup:file getattr; + +# /sys/devices/virtual/thermal/ +allow hal_thermal_default sysfs_thermal:dir r_dir_perms; +allow hal_thermal_default sysfs_thermal:file r_file_perms; -- 2.20.1