From 3cbf14a1836ebefe565adf2052ecbc536c5aa0f4 Mon Sep 17 00:00:00 2001
From: Ningyuan Wang <nywang@google.com>
Date: Thu, 19 May 2016 19:31:20 -0700
Subject: [PATCH] Sepolicy files for wificond

This sepolicy change allows wificond to run as a deamon.

BUG=28865186
TEST=compile
TEST=compile with ag/1059605
  Add wificond to '/target/product/base.mk'
  Adb shell ps -A | grep 'wificond'

Change-Id: If1e4a8542ac03e8ae42371d75aa46b90c3d8545d
(cherry picked from commit 4ef44a616ee5888023e5c53bbc2c4df6549f748a)
---
 file_contexts | 1 +
 wificond.te   | 5 +++++
 2 files changed, 6 insertions(+)
 create mode 100644 wificond.te

diff --git a/file_contexts b/file_contexts
index e2bb95bed..5eec7616a 100644
--- a/file_contexts
+++ b/file_contexts
@@ -161,6 +161,7 @@
 /system/bin/dumpstate   u:object_r:dumpstate_exec:s0
 /system/bin/vold	u:object_r:vold_exec:s0
 /system/bin/netd	u:object_r:netd_exec:s0
+/system/bin/wificond	u:object_r:wificond_exec:s0
 /system/bin/rild	u:object_r:rild_exec:s0
 /system/bin/audioserver	u:object_r:audioserver_exec:s0
 /system/bin/mediadrmserver	u:object_r:mediadrmserver_exec:s0
diff --git a/wificond.te b/wificond.te
new file mode 100644
index 000000000..11afffe66
--- /dev/null
+++ b/wificond.te
@@ -0,0 +1,5 @@
+# wificond
+type wificond, domain;
+type wificond_exec, exec_type, file_type;
+
+init_daemon_domain(wificond)
-- 
GitLab