57ab001530
This is a follow-up to9339168688
which added both hal_client_domain(cameraserver, hal_graphics_allocator) and binder_call(cameraserver, hal_graphics_allocator). The latter binder_call rule is no longer needed because it is automatically granted by virtue of cameraserver being marked as a client of Graphics Allocator HAL -- see49274721b3
. Test: Take a photo (both HDR and conventional) using Google Camera Test: Record video using Google Camera Test: Record slow motion video using Google Camera Test: No denials to do with cameraserver and hal_graphics_allocator* Bug: 34170079 Change-Id: If93fe310fa62923b5107a7e78d158f6e4b4d0b3a
43 lines
1.7 KiB
Text
43 lines
1.7 KiB
Text
# cameraserver - camera daemon
|
|
type cameraserver, domain;
|
|
type cameraserver_exec, exec_type, file_type;
|
|
|
|
binder_use(cameraserver)
|
|
binder_call(cameraserver, binderservicedomain)
|
|
binder_call(cameraserver, appdomain)
|
|
binder_service(cameraserver)
|
|
|
|
hal_client_domain(cameraserver, hal_camera)
|
|
hal_client_domain(cameraserver, hal_graphics_allocator)
|
|
|
|
allow cameraserver ion_device:chr_file rw_file_perms;
|
|
|
|
add_service(cameraserver, cameraserver_service)
|
|
allow cameraserver appops_service:service_manager find;
|
|
allow cameraserver audioserver_service:service_manager find;
|
|
allow cameraserver batterystats_service:service_manager find;
|
|
allow cameraserver cameraproxy_service:service_manager find;
|
|
allow cameraserver mediaserver_service:service_manager find;
|
|
allow cameraserver processinfo_service:service_manager find;
|
|
allow cameraserver scheduling_policy_service:service_manager find;
|
|
allow cameraserver surfaceflinger_service:service_manager find;
|
|
|
|
###
|
|
### neverallow rules
|
|
###
|
|
|
|
# cameraserver should never execute any executable without a
|
|
# domain transition
|
|
neverallow cameraserver { file_type fs_type }:file execute_no_trans;
|
|
|
|
# The goal of the mediaserver split is to place media processing code into
|
|
# restrictive sandboxes with limited responsibilities and thus limited
|
|
# permissions. Example: Audioserver is only responsible for controlling audio
|
|
# hardware and processing audio content. Cameraserver does the same for camera
|
|
# hardware/content. Etc.
|
|
#
|
|
# Media processing code is inherently risky and thus should have limited
|
|
# permissions and be isolated from the rest of the system and network.
|
|
# Lengthier explanation here:
|
|
# https://android-developers.googleblog.com/2016/05/hardening-media-stack.html
|
|
neverallow cameraserver domain:{ tcp_socket udp_socket rawip_socket } *;
|