From 3e8358f7a2fbb04f4cf8dd2c615ffed90a46e78d Mon Sep 17 00:00:00 2001 From: roynatech2544 Date: Fri, 10 Dec 2021 10:34:31 +0900 Subject: [PATCH] universal7885: import thermal-symlinks sepolicy Signed-off-by: roynatech2544 --- universal7885-common/sepolicy/vendor/file_contexts | 1 + .../sepolicy/vendor/init-thermal-symlinks.sh.te | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 universal7885-common/sepolicy/vendor/init-thermal-symlinks.sh.te diff --git a/universal7885-common/sepolicy/vendor/file_contexts b/universal7885-common/sepolicy/vendor/file_contexts index 5cb6245..1a465a9 100644 --- a/universal7885-common/sepolicy/vendor/file_contexts +++ b/universal7885-common/sepolicy/vendor/file_contexts @@ -226,6 +226,7 @@ # Thermal /(vendor|system/vendor)/bin/hw/android\.hardware\.thermal@2\.0-service\.pixel u:object_r:hal_thermal_default_exec:s0 /dev/thermal/(/.*)? u:object_r:thermal_link_device:s0 +/vendor/bin/thermal_symlinks u:object_r:init-thermal-symlinks-sh_exec:s0 # SamsungParts /(vendor|system/vendor)/bin/hw/vendor\.eureka\.hardware\.battery@1\.0-service u:object_r:hal_battery_default_exec:s0 diff --git a/universal7885-common/sepolicy/vendor/init-thermal-symlinks.sh.te b/universal7885-common/sepolicy/vendor/init-thermal-symlinks.sh.te new file mode 100644 index 0000000..941223b --- /dev/null +++ b/universal7885-common/sepolicy/vendor/init-thermal-symlinks.sh.te @@ -0,0 +1,10 @@ +type init-thermal-symlinks-sh, domain; +type init-thermal-symlinks-sh_exec, exec_type, vendor_file_type, file_type; +init_daemon_domain(init-thermal-symlinks-sh) +allow init-thermal-symlinks-sh vendor_toolbox_exec:file rx_file_perms; +allow init-thermal-symlinks-sh thermal_link_device:dir rw_dir_perms; +allow init-thermal-symlinks-sh thermal_link_device:lnk_file create_file_perms; +allow init-thermal-symlinks-sh sysfs_thermal:dir r_dir_perms; +allow init-thermal-symlinks-sh sysfs_thermal:file r_file_perms; +allow init-thermal-symlinks-sh sysfs_thermal:lnk_file r_file_perms; +set_prop(init-thermal-symlinks-sh, vendor_thermal_prop)