From 587b8b3d6722613c6ca0385d44eaf040662b8b41 Mon Sep 17 00:00:00 2001 From: Neelansh Mittal Date: Tue, 18 Nov 2014 19:31:25 +0530 Subject: [PATCH] wlan: Change location of hostapd files. Change location of hostapd accept and deny files from /data/hostapd to /data/misc/wifi because SElinux does not allow netd and hostapd to access /data/hostapd directory. Change-Id: I61e8521b3a4b6aab759d3b7cbc04acd3da3c8cf3 CRs-Fixed: 756614 --- softap/sdk/qsap_api.c | 1 - softap/sdk/qsap_api.h | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/softap/sdk/qsap_api.c b/softap/sdk/qsap_api.c index b4ef4a2..b2ab6ab 100644 --- a/softap/sdk/qsap_api.c +++ b/softap/sdk/qsap_api.c @@ -3196,7 +3196,6 @@ void check_for_configuration_files(void) FILE * fp; /* Check if configuration files are present, if not create the default files */ - mkdir("/data/hostapd", 0771); /* If configuration file does not exist copy the default file */ if ( NULL == (fp = fopen(CONFIG_FILE, "r")) ) { diff --git a/softap/sdk/qsap_api.h b/softap/sdk/qsap_api.h index 41ac8a3..3e7035c 100644 --- a/softap/sdk/qsap_api.h +++ b/softap/sdk/qsap_api.h @@ -98,19 +98,19 @@ enum error_val { #define DEFAULT_ACCEPT_LIST_FILE_PATH "/system/etc/hostapd/hostapd.accept" /** Accept list file name */ -#define ACCEPT_LIST_FILE "/data/hostapd/hostapd.accept" +#define ACCEPT_LIST_FILE "/data/misc/wifi/hostapd.accept" /** Default Deny list file name */ #define DEFAULT_DENY_LIST_FILE_PATH "/system/etc/hostapd/hostapd.deny" /** Deny list file name */ -#define DENY_LIST_FILE "/data/hostapd/hostapd.deny" +#define DENY_LIST_FILE "/data/misc/wifi/hostapd.deny" /** Default Ini file */ #define DEFAULT_INI_FILE "/persist/qcom/softap/qcom_cfg_default.ini" /** SDK control interface path */ -#define SDK_CTRL_IF "/data/hostapd/softap_sdk_ctrl" +#define SDK_CTRL_IF "/data/misc/wifi/softap_sdk_ctrl" /** Maximum length of the line in the configuration file */ #define MAX_CONF_LINE_LEN (156)