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;
|
2016-04-27 21:32:36 +02:00
|
|
|
allow debuggerd {
|
|
|
|
domain
|
|
|
|
-adbd
|
|
|
|
-debuggerd
|
|
|
|
-healthd
|
|
|
|
-init
|
|
|
|
-keystore
|
|
|
|
-ueventd
|
|
|
|
-watchdogd
|
|
|
|
}: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;
|
2016-03-09 03:02:15 +01:00
|
|
|
allow debuggerd domain:process { sigstop sigkill signal };
|
2013-10-29 19:42:35 +01:00
|
|
|
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-12-04 01:10:05 +01:00
|
|
|
|
2016-05-12 03:40:27 +02:00
|
|
|
allow debuggerd {
|
|
|
|
audioserver
|
2016-05-13 02:28:34 +02:00
|
|
|
bluetooth
|
2016-05-12 03:40:27 +02:00
|
|
|
cameraserver
|
|
|
|
drmserver
|
|
|
|
inputflinger
|
|
|
|
mediacodec
|
|
|
|
mediadrmserver
|
|
|
|
mediaextractor
|
|
|
|
mediaserver
|
|
|
|
sdcardd
|
|
|
|
surfaceflinger
|
|
|
|
}: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)
|