android_device_oneplus_dre/sepolicy/vendor/hal_camera_default.te
Bruno Martins 4cd2c8b6e5 sm8350-common: Bring up camera with enforcing SELinux
SELinux is more and more annoying nowadays, we all know that...
After spending hours to figure out why camera wasn't working while
on enforcing mode, the audits finally showed up after booting
into permissive mode. :S

05-31 01:19:55.133   877   877 I provider@2.4-se: type=1400 audit(0.0:456): avc: denied { read write } for name="capture" dev="sysfs" ino=116259 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
05-31 01:19:55.133   877   877 I provider@2.4-se: type=1400 audit(0.0:457): avc: denied { open } for path="/sys/kernel/tof_control/app0/capture" dev="sysfs" ino=116259 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1

Change-Id: I1727b1a299a02f15b75dce9a4d5c72201f6632c3
2021-06-01 23:23:38 +01:00

28 lines
1.1 KiB
Text

hal_client_domain(hal_camera_default, hal_cameraHIDL)
allow hal_camera_default mnt_vendor_file:dir w_dir_perms;
allow hal_camera_default mnt_vendor_file:file create_file_perms;
allow hal_camera_default oem_file:dir w_dir_perms;
allow hal_camera_default oem_file:file create_file_perms;
allow hal_camera_default vendor_persist_file:dir w_dir_perms;
allow hal_camera_default vendor_persist_file:file create_file_perms;
allow hal_camera_default input_device:dir r_dir_perms;
allow hal_camera_default input_device:chr_file r_file_perms;
allow hal_camera_default vl53l1_device:chr_file rw_file_perms;
allow hal_camera_default proc_meminfo:file r_file_perms;
allow hal_camera_default vendor_sysfs_video_call_on:file rw_file_perms;
allow hal_camera_default sysfs_ois_control:dir r_dir_perms;
allow hal_camera_default sysfs_ois_control:file rw_file_perms;
allow hal_camera_default sysfs_tof_control:dir r_dir_perms;
allow hal_camera_default sysfs_tof_control:file rw_file_perms;
get_prop(hal_camera_default, ctl_default_prop)
get_prop(hal_camera_default, vendor_db_security_prop)
get_prop(hal_camera_default, vendor_mmi_prop)