2016-06-18 00:05:10 +02:00
|
|
|
# storaged daemon
|
2016-07-01 21:18:54 +02:00
|
|
|
type storaged, domain, mlstrustedsubject;
|
2016-06-18 00:05:10 +02:00
|
|
|
type storaged_exec, exec_type, file_type;
|
|
|
|
|
|
|
|
init_daemon_domain(storaged)
|
|
|
|
|
|
|
|
# Read access to pseudo filesystems
|
|
|
|
r_dir_file(storaged, sysfs_type)
|
|
|
|
r_dir_file(storaged, proc_net)
|
2016-07-01 21:18:54 +02:00
|
|
|
r_dir_file(storaged, domain)
|
2016-06-18 00:05:10 +02:00
|
|
|
|
2017-01-12 01:20:49 +01:00
|
|
|
# Read /proc/uid_io/stats
|
|
|
|
allow storaged proc_uid_io_stats:file r_file_perms;
|
|
|
|
|
2016-07-01 21:18:54 +02:00
|
|
|
allow storaged self:capability { setgid setuid sys_nice sys_ptrace };
|
2016-06-18 00:05:10 +02:00
|
|
|
|
2016-07-01 21:18:54 +02:00
|
|
|
userdebug_or_eng(`
|
|
|
|
# Read access to debugfs
|
|
|
|
allow storaged debugfs_mmc:dir search;
|
|
|
|
allow storaged debugfs_mmc:file r_file_perms;
|
|
|
|
')
|
2016-06-18 00:05:10 +02:00
|
|
|
|
2016-07-01 21:18:54 +02:00
|
|
|
# Binder permissions
|
|
|
|
allow storaged storaged_service:service_manager add;
|
2017-01-12 01:20:49 +01:00
|
|
|
allow storaged permission_service:service_manager find;
|
|
|
|
|
2016-07-01 21:18:54 +02:00
|
|
|
binder_use(storaged)
|
|
|
|
binder_call(storaged, system_server)
|
|
|
|
|
|
|
|
###
|
|
|
|
### neverallow
|
|
|
|
###
|
|
|
|
neverallow storaged domain:process ptrace;
|