Allow incident to access statsd sockets
For incident section 1116, it runs incident-helper-cmd which executes app_process.
The metrics reporting in app_process currently writes metrics to Statsd.
Now grant the required statsd socket permission.
Bug: 183759310
Test: $ make selinux_policy
Push SELinux modules
$ ./pts-tradefed run pts -m PtsSELinuxTest -t com.google.android.selinux.pts.SELinuxTest#scanBugreport
Change-Id: I7a1ff6a3022414c4da2592a9a215d4b5e5f59ca2
diff --git a/private/incidentd.te b/private/incidentd.te
index 70e1187..a574eee 100644
--- a/private/incidentd.te
+++ b/private/incidentd.te
@@ -22,6 +22,9 @@
# section id 1002, allow reading kernel version /proc/version
allow incidentd proc_version:file r_file_perms;
+# section id 1116, allow accessing statsd socket
+unix_socket_send(incidentd, statsdw, statsd)
+
# section id 2001, allow reading /proc/pagetypeinfo
allow incidentd proc_pagetypeinfo:file r_file_perms;