[PATCH 10/12] hostapd-config: Error out if user configures sqlite db without CONFIG_SQLITE.

greearb at candelatech.com greearb at candelatech.com
Thu Mar 26 17:39:56 EDT 2015


From: Ben Greear <greearb at candelatech.com>

This should make it more obvious to users that they have a fatal configuration
problem.

Signed-off-by: Ben Greear <greearb at candelatech.com>
---
 hostapd/config_file.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index cae9fd3..f1e8df8 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -222,9 +222,14 @@ static int hostapd_config_read_eap_user(const char *fname,
 		return 0;
 
 	if (os_strncmp(fname, "sqlite:", 7) == 0) {
+#ifdef CONFIG_SQLITE
 		os_free(conf->eap_user_sqlite);
 		conf->eap_user_sqlite = os_strdup(fname + 7);
 		return 0;
+#else
+		wpa_printf(MSG_ERROR, "EAP user file is sqlite, but CONFIG_SQLITE is not enabled.\n");
+		return -1;
+#endif
 	}
 
 	f = fopen(fname, "r");
-- 
1.9.3



More information about the HostAP mailing list