Alex Klyubin | f5446eb | 2017-03-23 14:27:32 -0700 | [diff] [blame] | 1 | typeattribute incident coredomain; |
| 2 | |
Joe Onorato | 41f93db | 2016-11-20 23:23:04 -0800 | [diff] [blame] | 3 | type incident_exec, exec_type, file_type; |
| 4 | |
| 5 | # switch to incident domain for incident command |
| 6 | domain_auto_trans(shell, incident_exec, incident) |
| 7 | |
| 8 | # allow incident access to stdout from its parent shell. |
| 9 | allow incident shell:fd use; |
| 10 | |
Yi Jin | 1002de4 | 2018-01-31 12:33:57 -0800 | [diff] [blame] | 11 | # allow incident be able to output data for CTS to fetch. |
| 12 | allow incident devpts:chr_file { read write }; |
| 13 | |
Joe Onorato | 41f93db | 2016-11-20 23:23:04 -0800 | [diff] [blame] | 14 | # allow incident to communicate use, read and write over the adb |
| 15 | # connection. |
| 16 | allow incident adbd:fd use; |
| 17 | allow incident adbd:unix_stream_socket { read write }; |
| 18 | |
| 19 | # allow adbd to reap incident |
| 20 | allow 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. |
| 24 | binder_use(incident) |
| 25 | allow incident incident_service:service_manager find; |
| 26 | binder_call(incident, incidentd) |
| 27 | allow incident incidentd:fifo_file write; |
| 28 | |
Yi Jin | bc24ba7 | 2018-01-22 14:00:46 -0800 | [diff] [blame] | 29 | # only allow incident being called by shell |
| 30 | neverallow { domain -su -shell -incident } incident_exec:file { execute execute_no_trans }; |