blob: 5da3ec9ed7ffab0eab8d49f31a2e75aafa59dced [file] [log] [blame]
Inseob Kimff43be22021-06-07 16:56:56 +09001type statsd, domain, mlstrustedsubject;
2
3type statsd_exec, system_file_type, exec_type, file_type;
4binder_use(statsd)
5
6# Allow statsd to scan through /proc/pid for all processes.
7r_dir_file(statsd, domain)
8
9# Allow executing files on system, such as running a shell or running:
10# /system/bin/toolbox
11# /system/bin/logcat
12# /system/bin/dumpsys
13allow statsd devpts:chr_file { getattr ioctl read write };
14allow statsd shell_exec:file rx_file_perms;
15allow statsd system_file:file execute_no_trans;
16allow statsd toolbox_exec:file rx_file_perms;
17
Inseob Kimff43be22021-06-07 16:56:56 +090018# Allow statsd to interact with keystore to pull atoms
19allow statsd keystore_service:service_manager find;
20binder_call(statsd, keystore)
21
Inseob Kimff43be22021-06-07 16:56:56 +090022# Allow logd access.
23read_logd(statsd)
24control_logd(statsd)
25
Inseob Kimff43be22021-06-07 16:56:56 +090026# Allow 'adb shell cmd' to upload configs and download output.
27allow statsd adbd:fd use;
28allow statsd adbd:unix_stream_socket { getattr read write };
29allow statsd shell:fifo_file { getattr read write };
30
31unix_socket_send(statsd, statsdw, statsd)