sepolicy: allow traced_probes to access statsd socket
This allows us to log metrics from traced_probes to statsd
for failures. This is required for implementation of
go/perfetto-failure-stats.
This matches the CL aosp/1690788 which adds the initial logging to
traced_probes.
This solves the following denied message from logcat:
avc: denied { write } for comm="traced_probes" name="statsdw" scontext=u:r:traced_probes:s0 tcontext=u:object_r:statsdw_socket:s0
Bug: 177215620
Change-Id: I1523df818562f839b28061ef88f1910d4745a289
diff --git a/private/traced_probes.te b/private/traced_probes.te
index 2c4ee9d..730a45c 100644
--- a/private/traced_probes.te
+++ b/private/traced_probes.te
@@ -96,6 +96,9 @@
# On debug builds allow to ingest system logs into the trace.
userdebug_or_eng(`read_logd(traced_probes)')
+# Allow traced_probes to talk to statsd for logging metrics.
+unix_socket_send(traced_probes, statsdw, statsd)
+
###
### Neverallow rules
###