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
This commit is contained in:
Lalit Maganti 2021-04-30 12:13:39 +01:00
parent 24878f8816
commit 685205d3f0

View File

@ -96,6 +96,9 @@ hal_client_domain(traced_probes, hal_atrace)
# 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
###