#
# USF sensor HAL SELinux type enforcements.
#

# Allow reading of camera persist files.
r_dir_file(hal_sensors_default, persist_camera_file)

# Allow access to the files of CDT information.
r_dir_file(hal_sensors_default, sysfs_chosen)

# Allow access for dynamic sensor properties.
get_prop(hal_sensors_default, vendor_dynamic_sensor_prop)

# Allow access to raw HID devices for dynamic sensors.
allow hal_sensors_default hidraw_device:chr_file rw_file_perms;

# Allow sensor HAL to access the display service HAL
allow hal_sensors_default hal_pixel_display_service:service_manager find;

# Allow sensor HAL to access the graphics composer.
binder_call(hal_sensors_default, hal_graphics_composer_default)

# Allow access to the power supply files for MagCC.
allow hal_sensors_default sysfs_wlc:dir r_dir_perms;
