Allow keystore to write to statsd.
Keystore logging is migrated to use statsd. Therefore,
keystore needs permission to write to statsd.
Test: Treehugger passes.
Bug: 157664923
Change-Id: If15ee3eb2ae7036dbaccd31525feadb8f54c6162
Merged-In: I2fb61fd7e9732191e6991f199d04b5425b637830
diff --git a/prebuilts/api/30.0/private/keystore.te b/prebuilts/api/30.0/private/keystore.te
index ee6dbdf..81b6dfb 100644
--- a/prebuilts/api/30.0/private/keystore.te
+++ b/prebuilts/api/30.0/private/keystore.te
@@ -13,3 +13,6 @@
# Allow to check whether security logging is enabled.
get_prop(keystore, device_logging_prop)
+
+# Allow keystore to write to statsd.
+unix_socket_send(keystore, statsdw, statsd)
diff --git a/private/keystore.te b/private/keystore.te
index 492ce77..a36926e 100644
--- a/private/keystore.te
+++ b/private/keystore.te
@@ -16,3 +16,6 @@
# Keystore need access to the keystore_key context files to load the keystore key backend.
allow keystore keystore2_key_contexts_file:file r_file_perms;
+
+# Allow keystore to write to statsd.
+unix_socket_send(keystore, statsdw, statsd)