Allow to signal perfetto from shell.
When daemonizing perfetto, SIGINT should be sent to ensure clean
shutdown.
Denial:
12-06 11:12:16.566 3099 3099 I sh : type=1400 audit(0.0:462): avc: denied { signal } for scontext=u:r:shell:s0 tcontext=u:r:perfetto:s0 tclass=process permissive=1
Test: m
Test: flash walleye
Test: SIGINT perfetto from shell
Change-Id: I8d34b447ea90c315faf88f020f1dfc49e4abbcce
diff --git a/private/perfetto.te b/private/perfetto.te
index 4d8720a..2e43d90 100644
--- a/private/perfetto.te
+++ b/private/perfetto.te
@@ -3,7 +3,6 @@
# This command line client accesses the privileged socket of the traced
# daemon.
-type perfetto, domain, coredomain;
type perfetto_exec, system_file_type, exec_type, file_type;
tmpfs_domain(perfetto);
diff --git a/private/shell.te b/private/shell.te
index 8867112..95e0d40 100644
--- a/private/shell.te
+++ b/private/shell.te
@@ -44,6 +44,8 @@
# transition into its own domain, so that it behaves consistently to
# when exec()-d by statsd.
domain_auto_trans(shell, perfetto_exec, perfetto)
+# Allow to send SIGINT to perfetto when daemonized.
+allow shell perfetto:process signal;
# Allow shell to run adb shell cmd stats commands. Needed for CTS.
binder_call(shell, statsd);