platform_system_sepolicy/drmserver.te
Jeff Vander Stoep 188f9b1418 drmserver: read locked ringtones
(cherry picked from commit f23b870a69)

avc: denied { read } for comm="generic" path="/data/system_de/0/ringtones/ringtone_cache" dev="sda35" ino=1114120 scontext=u:r:drmserver:s0 tcontext=u:object_r:ringtone_file:s0 tclass=file

Change-Id: I40992733d779743be92c15a094d166a3df64a10f
Fixes: 30167454
2016-09-12 15:02:38 -07:00

59 lines
2 KiB
Text

# drmserver - DRM service
type drmserver, domain, domain_deprecated;
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 autoplay_app })
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 autoplay_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 };
allow drmserver ringtone_file:file { read getattr };
# Read /data/data/com.android.providers.telephony files passed over Binder.
allow drmserver radio_data_file:file { read getattr };
# /oem access
allow drmserver oemfs:dir search;
allow drmserver oemfs:file r_file_perms;
allow drmserver drmserver_service:service_manager { add find };
allow drmserver permission_service:service_manager find;
selinux_check_access(drmserver)
r_dir_file(drmserver, cgroup)
r_dir_file(drmserver, system_file)