drmserver.te 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # drmserver - DRM service
  2. type drmserver, domain;
  3. type drmserver_exec, system_file_type, exec_type, file_type;
  4. typeattribute drmserver mlstrustedsubject;
  5. net_domain(drmserver)
  6. # Perform Binder IPC to system server.
  7. binder_use(drmserver)
  8. binder_call(drmserver, system_server)
  9. binder_call(drmserver, appdomain)
  10. binder_service(drmserver)
  11. # Inherit or receive open files from system_server.
  12. allow drmserver system_server:fd use;
  13. # Perform Binder IPC to mediaserver
  14. binder_call(drmserver, mediaserver)
  15. allow drmserver sdcard_type:dir search;
  16. allow drmserver drm_data_file:dir create_dir_perms;
  17. allow drmserver drm_data_file:file create_file_perms;
  18. allow drmserver { app_data_file privapp_data_file }:file { read write getattr map };
  19. allow drmserver sdcard_type:file { read write getattr map };
  20. r_dir_file(drmserver, efs_file)
  21. type drmserver_socket, file_type;
  22. # /data/app/tlcd_sock socket file.
  23. # Clearly, /data/app is the most logical place to create a socket. Not.
  24. allow drmserver apk_data_file:dir rw_dir_perms;
  25. allow drmserver drmserver_socket:sock_file create_file_perms;
  26. # Delete old socket file if present.
  27. allow drmserver apk_data_file:sock_file unlink;
  28. # After taking a video, drmserver looks at the video file.
  29. r_dir_file(drmserver, media_rw_data_file)
  30. # Read resources from open apk files passed over Binder.
  31. allow drmserver apk_data_file:file { read getattr map };
  32. allow drmserver asec_apk_file:file { read getattr map };
  33. allow drmserver ringtone_file:file { read getattr map };
  34. # Read /data/data/com.android.providers.telephony files passed over Binder.
  35. allow drmserver radio_data_file:file { read getattr map };
  36. # /oem access
  37. allow drmserver oemfs:dir search;
  38. allow drmserver oemfs:file r_file_perms;
  39. add_service(drmserver, drmserver_service)
  40. allow drmserver permission_service:service_manager find;
  41. selinux_check_access(drmserver)
  42. r_dir_file(drmserver, cgroup)
  43. r_dir_file(drmserver, system_file)