Skip to content
Snippets Groups Projects
Commit 5670dd1f authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Statsd allow shell in selinux policy"

parents 2732f149 022ab0e7
No related branches found
No related tags found
No related merge requests found
...@@ -45,6 +45,9 @@ domain_auto_trans(shell, vendor_shell_exec, vendor_shell) ...@@ -45,6 +45,9 @@ domain_auto_trans(shell, vendor_shell_exec, vendor_shell)
# when exec()-d by statsd. # when exec()-d by statsd.
domain_auto_trans(shell, perfetto_exec, perfetto) domain_auto_trans(shell, perfetto_exec, perfetto)
# Allow shell to run adb shell cmd stats commands. Needed for CTS.
binder_call(shell, statsd);
# Allow shell to read and unlink traces stored in /data/misc/perfetto-traces. # Allow shell to read and unlink traces stored in /data/misc/perfetto-traces.
allow shell perfetto_traces_data_file:dir rw_dir_perms; allow shell perfetto_traces_data_file:dir rw_dir_perms;
allow shell perfetto_traces_data_file:file r_file_perms; allow shell perfetto_traces_data_file:file r_file_perms;
...@@ -72,6 +72,11 @@ binder_call(statsd, stats) ...@@ -72,6 +72,11 @@ binder_call(statsd, stats)
allow statsd proc_uid_cputime_showstat:file { getattr open read }; allow statsd proc_uid_cputime_showstat:file { getattr open read };
hal_client_domain(statsd, hal_power) hal_client_domain(statsd, hal_power)
# Allow 'adb shell cmd' to upload configs and download output.
allow statsd adbd:fd use;
allow statsd adbd:unix_stream_socket { read write };
### ###
### neverallow rules ### neverallow rules
### ###
......
...@@ -58,6 +58,9 @@ allow system_app anr_data_file:file create_file_perms; ...@@ -58,6 +58,9 @@ allow system_app anr_data_file:file create_file_perms;
# Settings need to access app name and icon from asec # Settings need to access app name and icon from asec
allow system_app asec_apk_file:file r_file_perms; allow system_app asec_apk_file:file r_file_perms;
# Allow system apps (like Settings) to interact with statsd
binder_call(system_app, statsd)
# Allow system apps to interact with incidentd # Allow system apps to interact with incidentd
binder_call(system_app, incidentd) binder_call(system_app, incidentd)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment