From 715955b78af4f24140e54c47c5f8bcc52f559142 Mon Sep 17 00:00:00 2001
From: Josh Gao <jmgao@google.com>
Date: Mon, 5 Jun 2017 14:12:16 -0700
Subject: [PATCH] crash_dump_fallback: allow dumpstate:pipe_file write.

It appears that selinux requires the write permission to receive
a writable pipe from dumpstate, for unclear reasons. Add the permission
for now.

Bug: http://b/62297059
Test: dumpstate
Merged-In: I0f25682177115aacd5c2203ddc0008228b0380ad
Change-Id: I0f25682177115aacd5c2203ddc0008228b0380ad
(cherry picked from commit 7aa085233aaadab7db6ad6e493d2a9a6de65d057)
---
 public/te_macros | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/public/te_macros b/public/te_macros
index d7609b3af..b1937d85d 100644
--- a/public/te_macros
+++ b/public/te_macros
@@ -470,7 +470,8 @@ userdebug_or_eng(`
 ')
 allow $1 anr_data_file:file append;
 allow $1 dumpstate:fd use;
-allow $1 dumpstate:fifo_file append;
+# TODO: Figure out why write is needed and remove.
+allow $1 dumpstate:fifo_file { append write };
 allow $1 tombstoned:unix_stream_socket connectto;
 allow $1 tombstoned:fd use;
 allow $1 tombstoned_crash_socket:sock_file write;
-- 
GitLab