Allow USF sensor HAL to read camera persist files.

USF sensor HAL requires access to camera persist files to determine if
the camera module has been replaced (e.g. via repair), which may affect
calibration of the magnetometer.

Bug: 193727762
Test: Verify sensor HAL can open and read files under
Test: /mnt/vendor/persist/camera/
Change-Id: Icb9d7a46bf8465e1a72054ac9c8493ba18445ef3
This commit is contained in:
Max Shi 2021-07-21 22:43:56 -07:00
parent 49804d8d6f
commit 0bd50d1eb5

View file

@ -2,10 +2,11 @@
# USF sensor HAL SELinux type enforcements.
#
# Allow reading of sensor registry persist files.
# Allow reading of sensor registry persist files and camera persist files.
allow hal_sensors_default persist_file:dir search;
allow hal_sensors_default mnt_vendor_file:dir search;
r_dir_file(hal_sensors_default, persist_sensor_reg_file)
r_dir_file(hal_sensors_default, persist_camera_file)
# Allow creation and writing of sensor registry data files.
allow hal_sensors_default sensor_reg_data_file:dir rw_dir_perms;