2012-01-04 18:33:27 +01:00
|
|
|
# drmserver - DRM service
|
2016-10-01 14:26:15 +02:00
|
|
|
type drmserver, domain;
|
2018-09-27 19:21:37 +02:00
|
|
|
type drmserver_exec, system_file_type, exec_type, file_type;
|
2012-01-04 18:33:27 +01:00
|
|
|
|
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)
|
2017-01-19 19:56:18 +01:00
|
|
|
binder_call(drmserver, appdomain)
|
2019-08-22 09:16:06 +02:00
|
|
|
binder_call(drmserver, mediametrics)
|
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;
|
2018-08-13 19:31:58 +02:00
|
|
|
allow drmserver { app_data_file privapp_data_file }:file { read write getattr map };
|
|
|
|
allow drmserver sdcard_type:file { read write getattr map };
|
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;
|
2020-12-09 09:16:51 +01:00
|
|
|
auditallow drmserver apk_data_file:dir { add_name write };
|
2014-02-04 22:49:01 +01:00
|
|
|
allow drmserver drmserver_socket:sock_file create_file_perms;
|
2020-12-09 09:16:51 +01:00
|
|
|
auditallow drmserver drmserver_socket:sock_file create;
|
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.
|
2018-08-13 19:31:58 +02:00
|
|
|
allow drmserver apk_data_file:file { read getattr map };
|
|
|
|
allow drmserver asec_apk_file:file { read getattr map };
|
|
|
|
allow drmserver ringtone_file:file { read getattr map };
|
2014-03-27 14:45:26 +01:00
|
|
|
|
|
|
|
# Read /data/data/com.android.providers.telephony files passed over Binder.
|
2018-08-13 19:31:58 +02:00
|
|
|
allow drmserver radio_data_file:file { read getattr map };
|
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
|
|
|
|
2020-04-23 16:38:43 +02:00
|
|
|
# overlay package access
|
|
|
|
allow drmserver vendor_overlay_file:file { read map };
|
|
|
|
|
2017-01-19 22:23:52 +01:00
|
|
|
add_service(drmserver, drmserver_service)
|
2015-04-08 22:04:59 +02:00
|
|
|
allow drmserver permission_service:service_manager find;
|
2019-08-22 09:16:06 +02:00
|
|
|
allow drmserver mediametrics_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)
|
2021-02-12 00:18:11 +01:00
|
|
|
r_dir_file(drmserver, cgroup_v2)
|
2016-09-10 01:27:17 +02:00
|
|
|
r_dir_file(drmserver, system_file)
|