blob: 98101e031394d9ec2f2bce8eefb0e7423c57fd00 [file] [log] [blame]
Alex Klyubinf5446eb2017-03-23 14:27:32 -07001typeattribute incident coredomain;
2
Nick Kralevich5e372712018-09-27 10:21:37 -07003type incident_exec, system_file_type, exec_type, file_type;
Joe Onorato41f93db2016-11-20 23:23:04 -08004
5# switch to incident domain for incident command
6domain_auto_trans(shell, incident_exec, incident)
7
8# allow incident access to stdout from its parent shell.
9allow incident shell:fd use;
10
Yi Jin1002de42018-01-31 12:33:57 -080011# allow incident be able to output data for CTS to fetch.
12allow incident devpts:chr_file { read write };
13
Joe Onorato41f93db2016-11-20 23:23:04 -080014# allow incident to communicate use, read and write over the adb
15# connection.
16allow incident adbd:fd use;
17allow incident adbd:unix_stream_socket { read write };
18
19# allow adbd to reap incident
20allow incident adbd:process { sigchld };
21
22# Allow the incident command to talk to the incidentd over the binder, and get
23# back the incident report data from a ParcelFileDescriptor.
24binder_use(incident)
25allow incident incident_service:service_manager find;
26binder_call(incident, incidentd)
27allow incident incidentd:fifo_file write;
28
Yi Jinbc24ba72018-01-22 14:00:46 -080029# only allow incident being called by shell
30neverallow { domain -su -shell -incident } incident_exec:file { execute execute_no_trans };