2012-01-04 18:33:27 +01:00
|
|
|
# debugger interface
|
2015-11-03 18:54:39 +01:00
|
|
|
type debuggerd, domain, domain_deprecated;
|
2012-01-04 18:33:27 +01:00
|
|
|
type debuggerd_exec, exec_type, file_type;
|
|
|
|
|
|
|
|
init_daemon_domain(debuggerd)
|
2013-10-29 19:42:35 +01:00
|
|
|
typeattribute debuggerd mlstrustedsubject;
|
2015-11-18 01:21:38 +01:00
|
|
|
allow debuggerd self:capability { dac_override sys_ptrace chown kill fowner setuid setgid };
|
2013-10-29 19:42:35 +01:00
|
|
|
allow debuggerd self:capability2 { syslog };
|
|
|
|
allow debuggerd domain:dir r_dir_perms;
|
|
|
|
allow debuggerd domain:file r_file_perms;
|
2014-05-17 04:14:13 +02:00
|
|
|
allow debuggerd domain:lnk_file read;
|
2014-07-24 21:25:43 +02:00
|
|
|
allow debuggerd { domain -init -ueventd -watchdogd -healthd -adbd -keystore }:process { ptrace getattr };
|
2013-10-29 19:42:35 +01:00
|
|
|
security_access_policy(debuggerd)
|
2015-11-18 01:21:38 +01:00
|
|
|
allow debuggerd tombstone_data_file:dir rw_dir_perms;
|
2013-10-29 19:42:35 +01:00
|
|
|
allow debuggerd tombstone_data_file:file create_file_perms;
|
2014-08-19 02:09:38 +02:00
|
|
|
allow debuggerd shared_relro_file:dir r_dir_perms;
|
|
|
|
allow debuggerd shared_relro_file:file r_file_perms;
|
2013-10-29 19:42:35 +01:00
|
|
|
allow debuggerd domain:process { sigstop signal };
|
|
|
|
allow debuggerd exec_type:file r_file_perms;
|
|
|
|
# Access app library
|
|
|
|
allow debuggerd system_data_file:file open;
|
2015-01-19 02:39:53 +01:00
|
|
|
# Allow debuggerd to redirect a dump_backtrace request to itself.
|
|
|
|
# This only happens on 64 bit systems, where all requests go to the 64 bit
|
|
|
|
# debuggerd and get redirected to the 32 bit debuggerd if the process is 32 bit.
|
2015-09-09 19:48:04 +02:00
|
|
|
allow debuggerd { audioserver drmserver mediaserver sdcardd surfaceflinger inputflinger }:debuggerd dump_backtrace;
|
2013-09-27 16:24:49 +02:00
|
|
|
|
|
|
|
# Connect to system_server via /data/system/ndebugsocket.
|
|
|
|
unix_socket_connect(debuggerd, system_ndebug, system_server)
|
2013-11-13 00:34:52 +01:00
|
|
|
|
2014-02-06 01:36:25 +01:00
|
|
|
userdebug_or_eng(`
|
|
|
|
allow debuggerd input_device:dir r_dir_perms;
|
|
|
|
allow debuggerd input_device:chr_file rw_file_perms;
|
|
|
|
')
|
|
|
|
|
2013-11-13 00:34:52 +01:00
|
|
|
# logd access
|
|
|
|
read_logd(debuggerd)
|
2014-07-24 21:25:43 +02:00
|
|
|
|
|
|
|
# Check SELinux permissions.
|
|
|
|
selinux_check_access(debuggerd)
|