Allow incidentd to attach perfetto traces on user.

Bug: 151140716
Change-Id: I821d1a504e6ffcea3a52e2c76bf2290e7b382a48
This commit is contained in:
Florian Mayer 2020-03-26 17:19:21 +01:00
parent cdc1a840ea
commit 487bf1c5ff
2 changed files with 5 additions and 12 deletions

View file

@ -50,11 +50,8 @@ allow incidentd stats_service:service_manager find;
binder_call(incidentd, statsd) binder_call(incidentd, statsd)
# section id 3026, allow reading /data/misc/perfetto-traces. # section id 3026, allow reading /data/misc/perfetto-traces.
# TODO(b/134706389): remove when no longer used. allow incidentd perfetto_traces_data_file:dir r_dir_perms;
userdebug_or_eng(` allow incidentd perfetto_traces_data_file:file r_file_perms;
allow incidentd perfetto_traces_data_file:dir r_dir_perms;
allow incidentd perfetto_traces_data_file:file r_file_perms;
');
# 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;
@ -176,13 +173,12 @@ userdebug_or_eng(`
### ###
# only specific domains can find the incident service # only specific domains can find the incident service
# TODO(b/134706389): remove "perfetto" when no longer used.
neverallow { neverallow {
domain domain
-dumpstate -dumpstate
-incident -incident
-incidentd -incidentd
userdebug_or_eng(`-perfetto') -perfetto
-permissioncontroller_app -permissioncontroller_app
-priv_app -priv_app
-statsd -statsd

View file

@ -44,11 +44,8 @@ unix_socket_send(perfetto, statsdw, statsd)
allow perfetto devpts:chr_file rw_file_perms; allow perfetto devpts:chr_file rw_file_perms;
# Allow perfetto to ask incidentd to start a report. # Allow perfetto to ask incidentd to start a report.
# TODO(b/134706389): remove when no longer used. allow perfetto incident_service:service_manager find;
userdebug_or_eng(` binder_call(perfetto, incidentd)
allow perfetto incident_service:service_manager find;
binder_call(perfetto, incidentd)
');
# perfetto log formatter calls isatty() on its stderr. Denial when running # perfetto log formatter calls isatty() on its stderr. Denial when running
# under adbd is harmless. Avoid generating denial logs. # under adbd is harmless. Avoid generating denial logs.