sepolicy: qti: Add rules for stmvl53l1 TOF sensor

Change-Id: I45714c6389c8c60904e0f1094bfb79f701832676
This commit is contained in:
LuK1337
2022-12-21 20:01:01 +01:00
parent 5c2acd54d9
commit 68e353f71e
4 changed files with 26 additions and 0 deletions

View File

@@ -7,6 +7,9 @@ type vendor_reserve_partition, dev_type;
# Sensors
type ssc_interactive_device, dev_type;
# TOF
type vendor_tof_device, dev_type;
# Ultrasound
type ultrasound_device, dev_type;

View File

@@ -75,6 +75,10 @@
# Storsec
/dev/block/platform/soc/1d84000\.ufshc/by-name/storsec_[ab] u:object_r:vendor_custom_ab_block_device:s0
# TOF
/(odm|vendor/odm)/bin/vl53l1_daemon_main u:object_r:vl53l1_daemon_main_exec:s0
/dev/stmvl53l1_ranging u:object_r:vendor_tof_device:s0
# Touch
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch@1\.0-service\.oplus u:object_r:hal_lineage_touch_default_exec:s0

View File

@@ -4,6 +4,9 @@ hal_client_domain(hal_camera_default, vendor_hal_cameraMDM)
allow hal_camera_default vendor_hal_orms_hwservice:hwservice_manager find;
allow hal_camera_default input_device:chr_file rw_file_perms;
allow hal_camera_default vendor_tof_device:chr_file rw_file_perms;
allow hal_camera_default mnt_vendor_file:dir search;
allow hal_camera_default proc_meminfo:file r_file_perms;
@@ -11,4 +14,6 @@ allow hal_camera_default proc_meminfo:file r_file_perms;
allow hal_camera_default vendor_persist_camera_file:dir w_dir_perms;
allow hal_camera_default vendor_persist_camera_file:file create_file_perms;
r_dir_file(hal_camera_default, input_device)
set_prop(hal_camera_default, vendor_camera_prop)

View File

@@ -0,0 +1,14 @@
type vl53l1_daemon_main, domain;
type vl53l1_daemon_main_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(vl53l1_daemon_main)
allow vl53l1_daemon_main self:{
netlink_generic_socket
netlink_kobject_uevent_socket
netlink_socket
} create_socket_perms_no_ioctl;
allow vl53l1_daemon_main self:netlink_iscsi_socket { read write create bind };
rw_dir_file(vl53l1_daemon_main, mnt_vendor_file)