From a10008c797c5bc7ca639a75ceb547cebd957067b Mon Sep 17 00:00:00 2001
From: Josh Gao <jmgao@google.com>
Date: Sun, 12 Mar 2017 19:02:36 -0700
Subject: [PATCH] Allow writing to tombstone files in crash_dump_fallback.

Allows the following denials:
     avc: denied { use } for pid=9099 comm="mediacodec" path="/data/tombstones/tombstone_08" dev="sda35" ino=877473 scontext=u:r:mediacodec:s0 tcontext=u:r:tombstoned:s0 tclass=fd permissive=1
     avc: denied { append } for pid=9099 comm="mediacodec" path="/data/tombstones/tombstone_08" dev="sda35" ino=877473 scontext=u:r:mediacodec:s0 tcontext=u:object_r:tombstone_data_file:s0 tclass=file permissive=1

Bug: http://b/36156624
Test: killall -ABRT media.codec
Test: killall -ABRT media.extractor
Change-Id: I3dde1879b44e3e63c747a3ff8dd4bf213cb8afb6
---
 public/te_macros | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/public/te_macros b/public/te_macros
index f70d791fd..bc5da6037 100644
--- a/public/te_macros
+++ b/public/te_macros
@@ -399,7 +399,9 @@ userdebug_or_eng(`
 ')
 allow $1 anr_data_file:file append;
 allow $1 tombstoned:unix_stream_socket connectto;
+allow $1 tombstoned:fd use;
 allow $1 tombstoned_crash_socket:sock_file write;
+allow $1 tombstone_data_file:file append;
 ')
 
 #####################################
-- 
GitLab