From e5775fbd09644640844fa928886afe26a44fab33 Mon Sep 17 00:00:00 2001
From: Dmitry Shmidt <dimitrysh@google.com>
Date: Wed, 7 Sep 2016 13:58:04 -0700
Subject: [PATCH] dumpstate: Fix wificond access

Bug: 31246864

Change-Id: I8319e632b3be1e558dfc550453b8298914c89064
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
---
 dumpstate.te | 3 +--
 wificond.te  | 4 ++++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dumpstate.te b/dumpstate.te
index 69504b9fb..80c156388 100644
--- a/dumpstate.te
+++ b/dumpstate.te
@@ -100,8 +100,7 @@ allow dumpstate { dm_device cache_block_device }:blk_file getattr;
 
 # Allow dumpstate to make binder calls to any binder service
 binder_call(dumpstate, binderservicedomain)
-binder_call(dumpstate, { appdomain autoplay_app netd })
-
+binder_call(dumpstate, { appdomain autoplay_app netd wificond })
 
 # Reading /proc/PID/maps of other processes
 allow dumpstate self:capability sys_ptrace;
diff --git a/wificond.te b/wificond.te
index 2c5fd1e99..eb02ded18 100644
--- a/wificond.te
+++ b/wificond.te
@@ -44,3 +44,7 @@ allow wificond self:capability { setuid setgid setpcap chown };
 allow wificond wpa_socket:dir rw_dir_perms;
 allow wificond system_wpa_socket:sock_file unlink;
 allow wificond wpa_socket:sock_file unlink;
+
+# dumpstate support
+allow wificond dumpstate:fd use;
+allow wificond dumpstate:fifo_file write;
\ No newline at end of file
-- 
GitLab