common: Add policy for AIDL thermal HAL
authorTim Zimmermann <tim@linux4.de>
Sun, 12 Nov 2023 05:47:00 +0000 (06:47 +0100)
committerTim Zimmermann <tim@linux4.de>
Sun, 21 Jan 2024 05:16:28 +0000 (06:16 +0100)
Change-Id: I7e6a6b51700b09a474616b32731b2a2173f2e7af

common/vendor/file_contexts
common/vendor/hal_thermal_default.te

index d32b9c0f9c6bca6439843574c0a81769e395a69f..9450a6f7ed50a8469a4b5a1a286d4b9511d37048 100644 (file)
 /(vendor|system/vendor)/bin/hw/android\.hardware\.memtrack-service\.samsung-mali                  u:object_r:hal_memtrack_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.power@[0-9].[0-9]-service\.exynos               u:object_r:hal_power_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.power(@[0-9]\.[0-9])?-service\.samsung-libperfmgr   u:object_r:hal_power_default_exec:s0
-/(vendor|system/vendor)/bin/hw/android\.hardware\.thermal@[0-9].[0-9]-service\.samsung            u:object_r:hal_thermal_default_exec:s0
+/(vendor|system/vendor)/bin/hw/android\.hardware\.thermal(@[0-9].[0-9])?-service\.samsung         u:object_r:hal_thermal_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.usb(@[0-9]\.[0-9])?-service\.samsung            u:object_r:hal_usb_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.nfc@[0-9]\.[0-9]-service\.samsung               u:object_r:hal_nfc_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.vibrator(@[0-9].[0-9])?-service\.samsung(-haptic)?    u:object_r:hal_vibrator_default_exec:s0
index 7cd9ba07ce5006bd89b11f27fe4e3cc8a793745c..27772b013d85bdc44eee229bcb5f6798c7f31858 100644 (file)
@@ -6,3 +6,9 @@ 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;
+
+get_prop(hal_thermal_default, vendor_thermal_prop)
+
+hal_client_domain(hal_thermal_default, hal_power)
+
+allow hal_thermal_default self:netlink_kobject_uevent_socket { create bind read setopt };