2013-11-13 00:34:52 +01:00
|
|
|
# android user-space log manager
|
2014-09-08 22:06:40 +02:00
|
|
|
type logd, domain, mlstrustedsubject;
|
2013-11-13 00:34:52 +01:00
|
|
|
type logd_exec, exec_type, file_type;
|
|
|
|
|
|
|
|
init_daemon_domain(logd)
|
|
|
|
|
2014-04-01 20:02:57 +02:00
|
|
|
allow logd self:capability { setuid setgid sys_nice audit_control };
|
|
|
|
allow logd self:capability2 syslog;
|
|
|
|
allow logd self:netlink_audit_socket { create_socket_perms nlmsg_write };
|
|
|
|
allow logd kernel:system syslog_read;
|
2014-04-07 23:04:30 +02:00
|
|
|
allow logd kmsg_device:chr_file w_file_perms;
|
2015-03-10 21:46:37 +01:00
|
|
|
allow logd system_data_file:file r_file_perms;
|
2013-11-13 00:34:52 +01:00
|
|
|
|
|
|
|
r_dir_file(logd, domain)
|
|
|
|
|
2014-10-16 00:49:37 +02:00
|
|
|
allow logd kernel:system syslog_mod;
|
|
|
|
|
2015-03-10 21:46:37 +01:00
|
|
|
control_logd(logd)
|
|
|
|
|
2013-11-13 00:34:52 +01:00
|
|
|
###
|
|
|
|
### Neverallow rules
|
|
|
|
###
|
|
|
|
### logd should NEVER do any of this
|
|
|
|
|
|
|
|
# Block device access.
|
|
|
|
neverallow logd dev_type:blk_file { read write };
|
|
|
|
|
|
|
|
# ptrace any other app
|
|
|
|
neverallow logd domain:process ptrace;
|
|
|
|
|
|
|
|
# Write to /system.
|
|
|
|
neverallow logd system_file:dir_file_class_set write;
|
|
|
|
|
|
|
|
# Write to files in /data/data or system files on /data
|
|
|
|
neverallow logd { app_data_file system_data_file }:dir_file_class_set write;
|