From 7468db67f6e8cf517e0c1ef731e974aa7ac2e63c Mon Sep 17 00:00:00 2001
From: Andreas Gampe <agampe@google.com>
Date: Wed, 24 Jan 2018 17:56:25 -0800
Subject: [PATCH] Sepolicy: Allow stack dumps of statsd

Allow dumpstate & system server watchdog to dump statsd stacks.

Bug: 72461610
Test: m
Change-Id: I4c3472881da253f85d54b5e5b767b06e2618af9c
---
 private/dumpstate.te     | 5 +++++
 private/system_server.te | 1 +
 2 files changed, 6 insertions(+)

diff --git a/private/dumpstate.te b/private/dumpstate.te
index 4c77b7938..0eafca6e7 100644
--- a/private/dumpstate.te
+++ b/private/dumpstate.te
@@ -32,3 +32,8 @@ binder_call(dumpstate, statsd)
 
 # Collect metrics on boot time created by init
 get_prop(dumpstate, boottime_prop)
+
+# Signal native processes to dump their stack.
+allow dumpstate {
+  statsd
+}:process signal;
diff --git a/private/system_server.te b/private/system_server.te
index 642c8bd0e..f8f5e3e49 100644
--- a/private/system_server.te
+++ b/private/system_server.te
@@ -239,6 +239,7 @@ allow system_server {
   mediaserver
   mediametrics
   sdcardd
+  statsd
   surfaceflinger
 
   # This list comes from HAL_INTERFACES_OF_INTEREST in
-- 
GitLab