2012-01-04 18:33:27 +01:00
|
|
|
# drmserver - DRM service
|
2016-10-01 14:26:15 +02:00
|
|
|
type drmserver, domain;
|
2012-01-04 18:33:27 +01:00
|
|
|
type drmserver_exec, exec_type, file_type;
|
|
|
|
|
2013-10-29 19:42:35 +01:00
|
|
|
typeattribute drmserver mlstrustedsubject;
|
|
|
|
|
2014-02-24 21:06:11 +01:00
|
|
|
net_domain(drmserver)
|
|
|
|
|
2013-10-29 19:42:35 +01:00
|
|
|
# Perform Binder IPC to system server.
|
|
|
|
binder_use(drmserver)
|
|
|
|
binder_call(drmserver, system_server)
|
2016-10-06 22:15:44 +02:00
|
|
|
binder_call(drmserver, { appdomain ephemeral_app })
|
2013-10-29 19:42:35 +01:00
|
|
|
binder_service(drmserver)
|
2016-10-01 14:26:15 +02:00
|
|
|
# Inherit or receive open files from system_server.
|
|
|
|
allow drmserver system_server:fd use;
|
2013-10-29 19:42:35 +01:00
|
|
|
|
|
|
|
# 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;
|
2016-10-06 22:15:44 +02:00
|
|
|
allow drmserver { app_data_file ephemeral_data_file}:file { read write getattr };
|
2013-10-29 19:42:35 +01:00
|
|
|
allow drmserver sdcard_type:file { read write getattr };
|
2014-01-31 22:20:20 +01:00
|
|
|
r_dir_file(drmserver, efs_file)
|
2013-10-29 19:42:35 +01:00
|
|
|
|
2014-02-04 22:49:01 +01:00
|
|
|
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;
|
2013-10-29 19:42:35 +01:00
|
|
|
allow drmserver tee:unix_stream_socket connectto;
|
2014-02-04 22:49:01 +01:00
|
|
|
# Delete old socket file if present.
|
|
|
|
allow drmserver apk_data_file:sock_file unlink;
|
2014-01-06 21:39:19 +01:00
|
|
|
|
|
|
|
# After taking a video, drmserver looks at the video file.
|
|
|
|
r_dir_file(drmserver, media_rw_data_file)
|
2014-03-13 20:35:46 +01:00
|
|
|
|
|
|
|
# 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 };
|
2016-07-21 00:11:10 +02:00
|
|
|
allow drmserver ringtone_file:file { read getattr };
|
2014-03-27 14:45:26 +01:00
|
|
|
|
|
|
|
# Read /data/data/com.android.providers.telephony files passed over Binder.
|
|
|
|
allow drmserver radio_data_file:file { read getattr };
|
2014-06-06 00:52:02 +02:00
|
|
|
|
2014-09-16 19:00:50 +02:00
|
|
|
# /oem access
|
2014-10-11 01:11:03 +02:00
|
|
|
allow drmserver oemfs:dir search;
|
2014-09-16 19:00:50 +02:00
|
|
|
allow drmserver oemfs:file r_file_perms;
|
2014-09-16 22:04:06 +02:00
|
|
|
|
2014-12-12 01:01:27 +01:00
|
|
|
allow drmserver drmserver_service:service_manager { add find };
|
2015-04-08 22:04:59 +02:00
|
|
|
allow drmserver permission_service:service_manager find;
|
2015-03-03 20:20:15 +01:00
|
|
|
|
2014-07-02 21:42:59 +02:00
|
|
|
selinux_check_access(drmserver)
|
2016-09-10 01:27:17 +02:00
|
|
|
|
|
|
|
r_dir_file(drmserver, cgroup)
|
|
|
|
r_dir_file(drmserver, system_file)
|