[SELinux] Fix hal_uwb_default dev access errors

Allow hal_uwb_default to access /dev/uci

Bug: 263048994
Test: http://ab/I86600010139623509
Change-Id: I6324044822f74d1f0d14cc9c6d057dce0dfcc9ee
Signed-off-by: Rex Lin <rexcylin@google.com>
This commit is contained in:
Rex Lin 2023-03-13 11:52:39 +08:00
parent 028c3dd417
commit e7616e3934
4 changed files with 3 additions and 5 deletions

View file

@ -1,7 +1,3 @@
# b/260366065
dontaudit hal_uwb_default device:chr_file { ioctl };
dontaudit hal_uwb_default device:chr_file { open };
dontaudit hal_uwb_default device:chr_file { read write };
# b/264489750 # b/264489750
userdebug_or_eng(` userdebug_or_eng(`
permissive hal_uwb_default; permissive hal_uwb_default;

1
vendor/device.te vendored
View file

@ -7,6 +7,7 @@ type ufs_internal_block_device, dev_type;
type logbuffer_device, dev_type; type logbuffer_device, dev_type;
type gxp_device, dev_type, mlstrustedobject; type gxp_device, dev_type, mlstrustedobject;
type fingerprint_device, dev_type; type fingerprint_device, dev_type;
type uci_device, dev_type;
# Dmabuf heaps # Dmabuf heaps
type sensor_direct_heap_device, dmabuf_heap_device_type, dev_type; type sensor_direct_heap_device, dmabuf_heap_device_type, dev_type;

View file

@ -160,4 +160,4 @@
/dev/dma_heap/vframe-secure u:object_r:video_secure_heap_device:s0 /dev/dma_heap/vframe-secure u:object_r:video_secure_heap_device:s0
/dev/dma_heap/vscaler-secure u:object_r:video_secure_heap_device:s0 /dev/dma_heap/vscaler-secure u:object_r:video_secure_heap_device:s0
/dev/dma_heap/vstream-secure u:object_r:video_secure_heap_device:s0 /dev/dma_heap/vstream-secure u:object_r:video_secure_heap_device:s0
/dev/uci u:object_r:uci_device:s0

View file

@ -1,4 +1,5 @@
type hal_uwb_vendor_default, domain; type hal_uwb_vendor_default, domain;
type hal_uwb_vendor_default_exec, vendor_file_type, exec_type, file_type; type hal_uwb_vendor_default_exec, vendor_file_type, exec_type, file_type;
allow hal_uwb_default uci_device:chr_file rw_file_perms;
init_daemon_domain(hal_uwb_vendor_default) init_daemon_domain(hal_uwb_vendor_default)