device_google_gs101/whitechapel/vendor/google/rlsservice.te
Boon Jun Soh 548c2f184d Fix rlsservice sepolicy
Allows bugreport generation

Bug: 315255760
Bug: 309379598
Test: abd bugreport & ensure lack of rls avc denied logs
Change-Id: Ib3fc7b089c7aea4aea69f219d4c19847d39b0729
2023-12-11 14:39:32 +08:00

42 lines
No EOL
1.2 KiB
Text

type rlsservice, domain;
type rlsservice_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(rlsservice)
vndbinder_use(rlsservice)
add_service(rlsservice, rls_service)
# access rainbow sensor calibration files
allow rlsservice persist_file:dir search;
allow rlsservice persist_camera_file:dir search;
allow rlsservice persist_camera_file:file r_file_perms;
allow rlsservice mnt_vendor_file:dir search;
# access device files
allow rlsservice rls_device:chr_file rw_file_perms;
binder_call(rlsservice, hal_camera_default)
binder_call(rlsservice, hal_sensors_default)
binder_call(rlsservice, servicemanager)
# Allow access to always-on compute device node
allow rlsservice device:dir { read watch };
allow rlsservice aoc_device:chr_file rw_file_perms;
# Allow access to display backlight information
allow rlsservice sysfs_leds:dir search;
allow rlsservice sysfs_leds:file r_file_perms;
# Allow use of the USF low latency transport
usf_low_latency_transport(rlsservice)
# For observing apex file changes
allow rlsservice apex_info_file:file r_file_perms;
# Allow read camera property
get_prop(rlsservice, vendor_camera_prop);
# Allow rlsservice bugreport generation
allow rlsservice dumpstate:fd use;
allow rlsservice dumpstate:fifo_file write;