aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/config_file.c
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2015-03-26 21:39:56 (GMT)
committerJouni Malinen <j@w1.fi>2015-03-28 11:11:05 (GMT)
commitc469d6228d6ed99355558396f3d54d6f34d5e75b (patch)
tree5370e1703e208d9d9803398f25b943b286dad43d /hostapd/config_file.c
parent270427ea3f2fa02eabe61d3dc3412677ac852aa1 (diff)
downloadhostap-c469d6228d6ed99355558396f3d54d6f34d5e75b.zip
hostap-c469d6228d6ed99355558396f3d54d6f34d5e75b.tar.gz
hostap-c469d6228d6ed99355558396f3d54d6f34d5e75b.tar.bz2
Error out if user configures SQLite DB without CONFIG_SQLITE
This should make it more obvious to users that they have a fatal configuration problem in hostapd authentication server. Signed-off-by: Ben Greear <greearb@candelatech.com>
Diffstat (limited to 'hostapd/config_file.c')
-rw-r--r--hostapd/config_file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index cae9fd3..82b08f9 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -222,9 +222,15 @@ 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 /* CONFIG_SQLITE */
+ wpa_printf(MSG_ERROR,
+ "EAP user file in SQLite DB, but CONFIG_SQLITE was not enabled in the build.");
+ return -1;
+#endif /* CONFIG_SQLITE */
}
f = fopen(fname, "r");