summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeelansh Mittal <neelanshm@codeaurora.org>2015-11-06 15:21:41 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2015-12-14 20:28:01 -0800
commit8f69b08889359c787a3db67e99a074d4db1d4c30 (patch)
treeaf5e1959fe88a83204516904f2597fc68cfd5052
parent5cac56b345dd9f30d47e0936682ca23d687097b1 (diff)
downloadandroid_device_qcom_sepolicy-8f69b08889359c787a3db67e99a074d4db1d4c30.tar.gz
android_device_qcom_sepolicy-8f69b08889359c787a3db67e99a074d4db1d4c30.tar.bz2
android_device_qcom_sepolicy-8f69b08889359c787a3db67e99a074d4db1d4c30.zip
Seandroid: Adding policy for WLAN.
Adding SEL policies for netd and hostapd. These policies will allow the netd to bind to the hostapd as monitor and listen to messages from the hostapd.Also, these will allow the supplicant to access the wpa_socket directory if it's created by netd. CRs-Fixed: 756001 Change-Id: Ib2446898d721a78a5c6a434520f873c69cb65758
-rw-r--r--common/hostapd.te2
-rw-r--r--common/net.te10
2 files changed, 12 insertions, 0 deletions
diff --git a/common/hostapd.te b/common/hostapd.te
index 09a24c21..54cec32d 100644
--- a/common/hostapd.te
+++ b/common/hostapd.te
@@ -42,3 +42,5 @@ allow hostapd cnd:{
allow hostapd cnd:fifo_file r_file_perms;
allow hostapd smem_log_device:chr_file rw_file_perms;
allow hostapd fstman:unix_dgram_socket sendto;
+allow hostapd netd:unix_dgram_socket sendto;
+allow hostapd wpa_socket:sock_file write;
diff --git a/common/net.te b/common/net.te
index f8cacb12..fc39608c 100644
--- a/common/net.te
+++ b/common/net.te
@@ -3,3 +3,13 @@ unix_socket_connect(netdomain, cnd, cnd)
# allow netdomain access to dpmd
unix_socket_connect(netdomain, dpmwrapper, dpmd)
+
+allow netd self:capability fsetid;
+allow netd hostapd:unix_dgram_socket sendto;
+
+# Allow netd to chmod dir /data/misc/dhcp
+allow netd dhcp_data_file:dir create_dir_perms;
+
+type_transition netd wifi_data_file:dir wpa_socket "sockets";
+allow netd wpa_socket:dir create_dir_perms;
+allow netd wpa_socket:sock_file create_file_perms;