Allow Perfetto to log to statsd

Denial:
10-31 21:17:11.150  8148  8148 W perfetto: type=1400 audit(0.0:135): avc: denied { write } for name="statsdw" dev="tmpfs" ino=33205 scontext=u:r:perfetto:s0 tcontext=u:object_r:statsdw_socket:s0 tclass=sock_file permissive=0

Bug: b/139351286
Test: adb shell perfetto -c :test --dropbox perfetto, watch logcat
  for denials
Change-Id: I401f1625212f85831ce54116271752578db29578
This commit is contained in:
Hector Dearman 2019-11-01 12:53:18 +00:00
parent 38c47f1bc0
commit 776a6169a0

View File

@ -34,9 +34,12 @@ allow perfetto { statsd shell su }:fifo_file { getattr read write };
allow perfetto adbd:fd use;
allow perfetto adbd:unix_stream_socket { read write };
# Allow adbd to reap perfetto
# Allow adbd to reap perfetto.
allow perfetto adbd:process { sigchld };
# Allow perfetto to write to statsd.
unix_socket_send(perfetto, statsdw, statsd)
# Allow to access /dev/pts when launched in an adb shell.
allow perfetto devpts:chr_file rw_file_perms;