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.

Change-Id: I6aff1cb71f805637abc79493ba2574143c5cf7cf
Test: adb root; adb shell setenforce 1; adb shell setprop ctl.start blank_screen
Test: adb logcat -b all | grep 'denied'
Bug: 151363454
This commit is contained in:
Robin Lee 2020-04-02 18:38:15 +02:00
parent fcdb7145c1
commit e58b2d4cae
2 changed files with 4 additions and 2 deletions

View file

@ -3,6 +3,5 @@ type blank_screen_exec, exec_type, file_type, system_file_type;
init_daemon_domain(blank_screen)
# hal_light_client has access to hal_light_server
hal_client_domain(blank_screen, hal_light)
allow blank_screen hal_light_service:service_manager find;

View file

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