incident.te 1.0 KB

123456789101112131415161718192021222324252627282930
  1. typeattribute incident coredomain;
  2. type incident_exec, system_file_type, exec_type, file_type;
  3. # switch to incident domain for incident command
  4. domain_auto_trans(shell, incident_exec, incident)
  5. # allow incident access to stdout from its parent shell.
  6. allow incident shell:fd use;
  7. # allow incident be able to output data for CTS to fetch.
  8. allow incident devpts:chr_file { read write };
  9. # allow incident to communicate use, read and write over the adb
  10. # connection.
  11. allow incident adbd:fd use;
  12. allow incident adbd:unix_stream_socket { read write };
  13. # allow adbd to reap incident
  14. allow incident adbd:process { sigchld };
  15. # Allow the incident command to talk to the incidentd over the binder, and get
  16. # back the incident report data from a ParcelFileDescriptor.
  17. binder_use(incident)
  18. allow incident incident_service:service_manager find;
  19. binder_call(incident, incidentd)
  20. allow incident incidentd:fifo_file write;
  21. # only allow incident being called by shell
  22. neverallow { domain -su -shell -incident } incident_exec:file { execute execute_no_trans };