Add sepolicy for sensor HAL accessing AOC reset sysfs node.

Bug: 184858369
Test: Verify sensor HAL process can write to the sysfs node.
Change-Id: I9700323bafa413b88f25e4117499bcc936bce9c6
This commit is contained in:
Max Shi 2021-04-12 23:02:31 -07:00
parent 4a5d646504
commit 55bd05960f
3 changed files with 5 additions and 0 deletions

View file

@ -41,6 +41,9 @@ allow hal_sensors_default sysfs_aoc:dir search;
# Allow use of the USF low latency transport.
usf_low_latency_transport(hal_sensors_default)
# Allow sensor HAL to reset AOC.
allow hal_sensors_default sysfs_aoc_reset:file w_file_perms;
#
# Suez type enforcements.
#

View file

@ -94,6 +94,7 @@ type sysfs_touch, sysfs_type, fs_type;
type sysfs_aoc_boottime, sysfs_type, fs_type;
type sysfs_aoc_firmware, sysfs_type, fs_type;
type sysfs_aoc, sysfs_type, fs_type;
type sysfs_aoc_reset, sysfs_type, fs_type;
# Audio
type persist_audio_file, file_type, vendor_persist_type;

View file

@ -2,6 +2,7 @@
genfscon sysfs /devices/platform/19000000.aoc/aoc_clock_and_kernel_boottime u:object_r:sysfs_aoc_boottime:s0
genfscon sysfs /devices/platform/19000000.aoc/firmware u:object_r:sysfs_aoc_firmware:s0
genfscon sysfs /devices/platform/19000000.aoc u:object_r:sysfs_aoc:s0
genfscon sysfs /devices/platform/19000000.aoc/reset u:object_r:sysfs_aoc_reset:s0
# WiFi
genfscon sysfs /wifi u:object_r:sysfs_wifi:s0