aboutsummaryrefslogtreecommitdiffstats
path: root/drmserver.te
blob: 12e3ac7c86d1045ed1c0b32c3d6ca2b18edd999d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# drmserver - DRM service
type drmserver, domain;
type drmserver_exec, exec_type, file_type;

init_daemon_domain(drmserver)
typeattribute drmserver mlstrustedsubject;

net_domain(drmserver)

# Perform Binder IPC to system server.
binder_use(drmserver)
binder_call(drmserver, system_server)
binder_call(drmserver, appdomain)
binder_service(drmserver)

# Perform Binder IPC to mediaserver
binder_call(drmserver, mediaserver)

allow drmserver sdcard_type:dir search;
allow drmserver drm_data_file:dir create_dir_perms;
allow drmserver drm_data_file:file create_file_perms;
allow drmserver tee_device:chr_file rw_file_perms;
allow drmserver app_data_file:file { read write getattr };
allow drmserver sdcard_type:file { read write getattr };
r_dir_file(drmserver, efs_file)

type drmserver_socket, file_type;

# /data/app/tlcd_sock socket file.
# Clearly, /data/app is the most logical place to create a socket.  Not.
allow drmserver apk_data_file:dir rw_dir_perms;
type_transition drmserver apk_data_file:sock_file drmserver_socket;
allow drmserver drmserver_socket:sock_file create_file_perms;
allow drmserver tee:unix_stream_socket connectto;
# Delete old socket file if present.
allow drmserver apk_data_file:sock_file unlink;

# After taking a video, drmserver looks at the video file.
r_dir_file(drmserver, media_rw_data_file)

# Read resources from open apk files passed over Binder.
allow drmserver apk_data_file:file { read getattr };
allow drmserver asec_apk_file:file { read getattr };

# Read /data/data/com.android.providers.telephony files passed over Binder.
allow drmserver radio_data_file:file { read getattr };

allow drmserver drmserver_service:service_manager add;

# Audited locally.
service_manager_local_audit_domain(drmserver)
auditallow drmserver { service_manager_type -drmserver_service }:service_manager find;