blob: 7cc7765fb1ab73c63e2463a8fb817d98826b58e1 [file] [log] [blame]
Marco Nelissen2afb2172015-12-16 15:47:57 -08001# mediacodec - multimedia daemon
2type mediacodec, domain, domain_deprecated;
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 kernel:system module_request;
15allow mediacodec gpu_device:chr_file rw_file_perms;
16allow mediacodec video_device:dir r_dir_perms;
17allow mediacodec video_device:chr_file rw_file_perms;
18
19# Needed on some devices for playing DRM protected content,
20# but seems expected and appropriate for all devices.
21unix_socket_connect(mediacodec, drmserver, drmserver)
22
23allow mediacodec drmserver_service:service_manager find;
24allow mediacodec mediacodec_service:service_manager { add find };
25allow mediacodec processinfo_service:service_manager find;
26allow mediacodec surfaceflinger_service:service_manager find;
27
28use_drmservice(mediacodec)
29allow mediacodec drmserver:drmservice {
30 consumeRights
31 setPlaybackStatus
32 openDecryptSession
33 closeDecryptSession
34 initializeDecryptUnit
35 decrypt
36 finalizeDecryptUnit
37 pread
38};
39
40###
41### neverallow rules
42###
43
44# mediacodec should never execute any executable without a
45# domain transition
46neverallow mediacodec { file_type fs_type }:file execute_no_trans;