blob: adba40be8cea6a994318da2d622472f033e0d8c6 [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;
Marco Nelissen6c53b232016-02-27 21:25:03 -080015allow mediacodec surfaceflinger_service:service_manager find;
Marco Nelissenc3ba2e52016-02-02 16:10:37 -080016allow mediacodec gpu_device:chr_file rw_file_perms;
17allow mediacodec video_device:chr_file rw_file_perms;
Robb Glasserb7a76e92016-02-11 10:33:57 -080018allow mediacodec video_device:dir search;
Marco Nelissenebf79f82016-02-24 10:03:25 -080019allow mediacodec ion_device:chr_file rw_file_perms;
Marco Nelissenc3ba2e52016-02-02 16:10:37 -080020
21###
22### neverallow rules
23###
24
25# mediacodec should never execute any executable without a
26# domain transition
27neverallow mediacodec { file_type fs_type }:file execute_no_trans;
28
29# mediacodec should never need network access. Disallow all sockets
30# other than those needed for normal system functions
31neverallow mediacodec { domain -debuggerd -dumpstate -adbd -mediacodec -logd userdebug_or_eng(`-su')}:socket_class_set *;