android_system_sepolicy/public/mediatranscoding.te
Chong Zhang f31e642494 allow media transcoding service to use activity service
Allow media transcoding service to get uid states from
activity manager for scheduling transcoding jobs.

bug: 145233472
bug: 154734285
test: mediatranscodingservice_tests (unit tests)
Change-Id: I96cfa52b323e9ae3841eca5519e9182347a5672b
2020-04-29 11:44:53 -07:00

29 lines
1.2 KiB
Plaintext

# mediatranscoding - daemon for transcoding video and image.
type mediatranscoding, domain;
type mediatranscoding_exec, system_file_type, exec_type, file_type;
binder_use(mediatranscoding)
binder_call(mediatranscoding, binderservicedomain)
binder_service(mediatranscoding)
add_service(mediatranscoding, mediatranscoding_service)
allow mediatranscoding system_server:fd use;
allow mediatranscoding activity_service:service_manager find;
# mediatranscoding should never execute any executable without a
# domain transition
neverallow mediatranscoding { 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 mediatranscoding domain:{ tcp_socket udp_socket rawip_socket } *;