summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbhishek Srivastava <cabsriv@codeaurora.org>2018-03-05 19:21:44 +0530
committerBruno Martins <bgcngm@gmail.com>2018-11-25 13:33:36 +0100
commit21d0c28d9569cfeb119776b955907eb5390de758 (patch)
treebacc605a0ad517049e397931932733858c4a8800
parent11ff404084dbf0d9632ceffd8a396fca9ad05933 (diff)
downloadandroid_device_qcom_sepolicy-legacy-21d0c28d9569cfeb119776b955907eb5390de758.tar.gz
android_device_qcom_sepolicy-legacy-21d0c28d9569cfeb119776b955907eb5390de758.tar.bz2
android_device_qcom_sepolicy-legacy-21d0c28d9569cfeb119776b955907eb5390de758.zip
sepolicy: Allow hostapd to access/write /data/vendor/ partition
While turning on SAP, conf file is created in /data/vendor/wifi/hostapd . selinux permission is added to create files under the same path. CRs-Fixed: 2195908 Change-Id: I20c7f806f5597e8e9d88118feaf340f54b286569
-rw-r--r--common/hal_wifi_hostapd.te30
1 files changed, 30 insertions, 0 deletions
diff --git a/common/hal_wifi_hostapd.te b/common/hal_wifi_hostapd.te
new file mode 100644
index 0000000..a19470c
--- /dev/null
+++ b/common/hal_wifi_hostapd.te
@@ -0,0 +1,30 @@
+# Copyright (c) 2018, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Allow hostapd to access it's data folder
+allow hal_wifi_hostapd_default hostapd_data_file:dir rw_dir_perms;
+allow hal_wifi_hostapd_default hostapd_data_file:file create_file_perms;