Skip to content
Snippets Groups Projects
Commit d2f3d18f authored by Bookatz's avatar Bookatz
Browse files

Incidentd gets statsd incident section

There is now an incident section for statsd output data. These selinux
changes must be made for incident to call dump on statsd to get the
data.

Bug: 115678461
Test: adb shell incident -b 3023
and confirm that a valid statsd section is obtained

Change-Id: I761389c160ab3ab6c24556813a1a31088c0f5137
parent 41ab29ee
No related branches found
No related tags found
No related merge requests found
...@@ -45,6 +45,10 @@ allow incidentd sysfs_batteryinfo:file r_file_perms; ...@@ -45,6 +45,10 @@ allow incidentd sysfs_batteryinfo:file r_file_perms;
userdebug_or_eng(`allow incidentd pstorefs:dir search'); userdebug_or_eng(`allow incidentd pstorefs:dir search');
userdebug_or_eng(`allow incidentd pstorefs:file r_file_perms'); userdebug_or_eng(`allow incidentd pstorefs:file r_file_perms');
# section id 3023, allow obtaining stats report
allow incidentd stats_service:service_manager find;
binder_call(incidentd, statsd)
# Create and write into /data/misc/incidents # Create and write into /data/misc/incidents
allow incidentd incident_data_file:dir rw_dir_perms; allow incidentd incident_data_file:dir rw_dir_perms;
allow incidentd incident_data_file:file create_file_perms; allow incidentd incident_data_file:file create_file_perms;
......
...@@ -37,10 +37,10 @@ binder_call(statsd, stats) ...@@ -37,10 +37,10 @@ binder_call(statsd, stats)
### neverallow rules ### neverallow rules
### ###
# Only system_server, system_app, traceur_app, and stats command can find the stats service.
neverallow { neverallow {
domain domain
-dumpstate -dumpstate
-incidentd
-priv_app -priv_app
-shell -shell
-stats -stats
......
...@@ -14,3 +14,6 @@ domain_auto_trans(statsd, perfetto_exec, perfetto) ...@@ -14,3 +14,6 @@ domain_auto_trans(statsd, perfetto_exec, perfetto)
allow statsd { allow statsd {
statscompanion_service statscompanion_service
}:service_manager find; }:service_manager find;
# Allow incidentd to obtain the statsd incident section.
allow statsd incidentd:fifo_file write;
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