Allow blank_screen to make binder calls to the servicemanager

blank_screen can not find and use the lights HAL if it cannot use the servicemanager. This
broke turning off the display during shutdown.

Test: adb root; adb shell setenforce 0; adb shell setprop ctl.start blank_screen
Test: adb logcat -b all | grep 'denied'
Fix: 151363454
Merged-In: I6aff1cb71f805637abc79493ba2574143c5cf7cf
Change-Id: I6aff1cb71f805637abc79493ba2574143c5cf7cf
This commit is contained in:
Robin Lee 2020-03-30 12:23:58 +00:00
parent 61d58248fc
commit a006484f22
2 changed files with 5 additions and 4 deletions

View file

@ -4,5 +4,3 @@ type blank_screen_exec, exec_type, file_type, system_file_type;
init_daemon_domain(blank_screen)
hal_client_domain(blank_screen, hal_light)
allow blank_screen hal_light_service:service_manager find;

View file

@ -4,11 +4,14 @@ binder_call(hal_light_server, hal_light_client)
hal_attribute_hwservice(hal_light, hal_light_hwservice)
# client finds and uses server via service_manager
allow hal_light_client hal_light_service:service_manager find;
binder_use(hal_light_client)
# server adds itself via service_manager
add_service(hal_light_server, hal_light_service)
binder_call(hal_light_server, servicemanager)
allow hal_light_client hal_light_service:service_manager find;
allow hal_light_server dumpstate:fifo_file write;
allow hal_light sysfs_leds:lnk_file read;