2012-01-04 18:33:27 +01:00
|
|
|
# debugger interface
|
|
|
|
type debuggerd, domain;
|
|
|
|
type debuggerd_exec, exec_type, file_type;
|
|
|
|
|
|
|
|
init_daemon_domain(debuggerd)
|
2013-10-29 19:42:35 +01:00
|
|
|
typeattribute debuggerd mlstrustedsubject;
|
|
|
|
allow debuggerd self:capability { dac_override sys_ptrace chown kill fowner };
|
|
|
|
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-05-20 06:49:50 +02:00
|
|
|
allow debuggerd { domain -init -ueventd -watchdogd -healthd -adbd -keystore }:process ptrace;
|
2013-10-29 19:42:35 +01:00
|
|
|
security_access_policy(debuggerd)
|
|
|
|
allow debuggerd system_data_file:dir create_dir_perms;
|
|
|
|
allow debuggerd system_data_file:dir relabelfrom;
|
2013-07-13 00:38:41 +02:00
|
|
|
allow debuggerd tombstone_data_file:dir relabelto;
|
2013-10-29 19:42:35 +01:00
|
|
|
allow debuggerd tombstone_data_file:dir create_dir_perms;
|
|
|
|
allow debuggerd tombstone_data_file:file create_file_perms;
|
|
|
|
allow debuggerd domain:process { sigstop signal };
|
|
|
|
allow debuggerd exec_type:file r_file_perms;
|
|
|
|
# Access app library
|
|
|
|
allow debuggerd system_data_file:file open;
|
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)
|