From eaeec28c23cf62f9aa6520dfceb127a04bc34e61 Mon Sep 17 00:00:00 2001 From: chiayupei Date: Mon, 11 Apr 2022 19:45:06 +0800 Subject: [PATCH] hal_sensors_default: Allow sensors HAL to access AoC sysfs and properties. Bug: 202901227 Test: Verify pass by checking device log. Signed-off-by: chiayupei Change-Id: I67e0fcc4ad89ff3c1945f6fdd83d01f14fcdcbec --- whitechapel_pro/hal_sensors_default.te | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/whitechapel_pro/hal_sensors_default.te b/whitechapel_pro/hal_sensors_default.te index b33741e5..4e1b8ca1 100644 --- a/whitechapel_pro/hal_sensors_default.te +++ b/whitechapel_pro/hal_sensors_default.te @@ -36,9 +36,18 @@ allow hal_sensors_default sensor_reg_data_file:file r_file_perms; # Allow access to the display info for ALS. allow hal_sensors_default sysfs_display:file rw_file_perms; +# Allow access to the sysfs_aoc. +allow hal_sensors_default sysfs_aoc:dir search; +allow hal_sensors_default sysfs_aoc:file r_file_perms; + +# Allow access for AoC properties. +get_prop(hal_sensors_default, vendor_aoc_prop) + +# Allow sensor HAL to read AoC dumpstate. +allow hal_sensors_default sysfs_aoc_dumpstate:file r_file_perms; + # Allow access to the AoC clock and kernel boot time sys FS node. This is needed # to synchronize the AP and AoC clock timestamps. -allow hal_sensors_default sysfs_aoc:dir search; allow hal_sensors_default sysfs_aoc_boottime:file r_file_perms; # Allow access to the files of CDT information.