2015-12-04 01:10:05 +01:00
|
|
|
# cameraserver - camera daemon
|
2016-02-05 23:17:22 +01:00
|
|
|
type cameraserver, domain;
|
2015-12-04 01:10:05 +01:00
|
|
|
type cameraserver_exec, exec_type, file_type;
|
|
|
|
|
|
|
|
binder_use(cameraserver)
|
|
|
|
binder_call(cameraserver, binderservicedomain)
|
|
|
|
binder_call(cameraserver, appdomain)
|
|
|
|
binder_service(cameraserver)
|
|
|
|
|
2017-02-17 01:08:22 +01:00
|
|
|
hal_client_domain(cameraserver, hal_camera)
|
2017-04-13 19:29:42 +02:00
|
|
|
|
2017-03-20 22:30:01 +01:00
|
|
|
hal_client_domain(cameraserver, hal_graphics_allocator)
|
2016-12-22 21:55:02 +01:00
|
|
|
|
2016-02-05 23:17:22 +01:00
|
|
|
allow cameraserver ion_device:chr_file rw_file_perms;
|
2015-12-04 01:10:05 +01:00
|
|
|
|
2017-04-15 00:55:20 +02:00
|
|
|
# Talk with graphics composer fences
|
|
|
|
allow cameraserver hal_graphics_composer:fd use;
|
|
|
|
|
2017-01-19 22:23:52 +01:00
|
|
|
add_service(cameraserver, cameraserver_service)
|
2015-12-04 01:10:05 +01:00
|
|
|
allow cameraserver appops_service:service_manager find;
|
|
|
|
allow cameraserver audioserver_service:service_manager find;
|
|
|
|
allow cameraserver batterystats_service:service_manager find;
|
2016-02-05 23:17:22 +01:00
|
|
|
allow cameraserver cameraproxy_service:service_manager find;
|
2015-12-04 01:10:05 +01:00
|
|
|
allow cameraserver mediaserver_service:service_manager find;
|
|
|
|
allow cameraserver processinfo_service:service_manager find;
|
2016-02-12 03:03:31 +01:00
|
|
|
allow cameraserver scheduling_policy_service:service_manager find;
|
2015-12-04 01:10:05 +01:00
|
|
|
allow cameraserver surfaceflinger_service:service_manager find;
|
|
|
|
|
2017-04-14 04:05:27 +02:00
|
|
|
allow cameraserver hidl_token_hwservice:hwservice_manager find;
|
|
|
|
|
2015-12-04 01:10:05 +01:00
|
|
|
###
|
|
|
|
### neverallow rules
|
|
|
|
###
|
|
|
|
|
|
|
|
# cameraserver should never execute any executable without a
|
|
|
|
# domain transition
|
|
|
|
neverallow cameraserver { file_type fs_type }:file execute_no_trans;
|
2016-04-23 00:34:40 +02:00
|
|
|
|
2017-02-16 21:34:51 +01:00
|
|
|
# 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
|
2016-04-23 00:34:40 +02:00
|
|
|
neverallow cameraserver domain:{ tcp_socket udp_socket rawip_socket } *;
|