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
(cherry picked from commit a10008c797c5bc7ca639a75ceb547cebd957067b)
diff --git a/public/te_macros b/public/te_macros
index f70d791..bc5da60 100644
--- a/public/te_macros
+++ b/public/te_macros
@@ -399,7 +399,9 @@
')
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;
')
#####################################