blob: cf2047cb680b23ed8cb17ea665784e8f934a6bac [file] [log] [blame]
Marco Nelissenc3ba2e52016-02-02 16:10:37 -08001# mediacodec - audio and video codecs live here
2type mediacodec, domain;
3type mediacodec_exec, exec_type, file_type;
4
5typeattribute mediacodec mlstrustedsubject;
6
7init_daemon_domain(mediacodec)
8
9binder_use(mediacodec)
10binder_call(mediacodec, binderservicedomain)
11binder_call(mediacodec, appdomain)
12binder_service(mediacodec)
13
14allow mediacodec mediacodec_service:service_manager add;
15allow mediacodec gpu_device:chr_file rw_file_perms;
16allow mediacodec video_device:chr_file rw_file_perms;
17allow mediacodec ion_device:chr_file r_file_perms;
18
19###
20### neverallow rules
21###
22
23# mediacodec should never execute any executable without a
24# domain transition
25neverallow mediacodec { file_type fs_type }:file execute_no_trans;
26
27# mediacodec should never need network access. Disallow all sockets
28# other than those needed for normal system functions
29neverallow mediacodec { domain -debuggerd -dumpstate -adbd -mediacodec -logd userdebug_or_eng(`-su')}:socket_class_set *;