Skip to content
Snippets Groups Projects
Commit de3a3e41 authored by Mike Ma's avatar Mike Ma
Browse files

Allow dumpstate to dump incidentd

An incident.proto section has been added to the bugreport. Need
appropriate sepolicy changes to allow binder calls and fd access.

Bug: 119417232
Test: adb bugreport. Verify incident.proto is in the proto folder,
      and there are no sepolicy violations.

Change-Id: Iac27cbf283a2e1cb41862c76343c2b639f6c0e1e
parent 3350a794
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,9 @@ userdebug_or_eng(`
allow dumpstate wm_trace_data_file:file r_file_perms;
')
# Allow dumpstate to make binder calls to incidentd
binder_call(dumpstate, incidentd)
# Allow dumpstate to make binder calls to storaged service
binder_call(dumpstate, storaged)
......
......@@ -6,8 +6,8 @@ type incident_helper_exec, system_file_type, exec_type, file_type;
domain_auto_trans(incidentd, incident_helper_exec, incident_helper)
# use pipe to transmit data from/to incidentd/incident_helper for parsing
allow incident_helper { shell incident incidentd }:fd use;
allow incident_helper { shell incident incidentd }:fifo_file { getattr read write };
allow incident_helper { shell incident incidentd dumpstate }:fd use;
allow incident_helper { shell incident incidentd dumpstate }:fifo_file { getattr read write };
allow incident_helper incidentd:unix_stream_socket { read write };
# only allow incidentd and shell to call incident_helper
......
......@@ -134,9 +134,9 @@ allow incidentd {
# Only incidentd can publish the binder service
add_service(incidentd, incident_service)
# Allow pipes from (and only from) incident
allow incidentd incident:fd use;
allow incidentd incident:fifo_file write;
# Allow pipes only from dumpstate and incident
allow incidentd { dumpstate incident }:fd use;
allow incidentd { dumpstate incident }:fifo_file write;
# Allow incident to call back to incident with status updates.
binder_call(incidentd, incident)
......@@ -145,9 +145,10 @@ binder_call(incidentd, incident)
### neverallow rules
###
# only system_server, system_app and incident command can find the incident service
# only dumpstate, system_server, system_app and incident command can find the incident service
neverallow {
domain
-dumpstate
-incident
-incidentd
-statsd
......
......@@ -209,7 +209,6 @@ allow dumpstate {
-apex_service
-dumpstate_service
-gatekeeper_service
-incident_service
-iorapd_service
-virtual_touchpad_service
-vold_service
......@@ -220,7 +219,6 @@ dontaudit dumpstate {
apex_service
dumpstate_service
gatekeeper_service
incident_service
iorapd_service
virtual_touchpad_service
vold_service
......
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