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>
This commit is contained in:
parent
270427ea3f
commit
c469d6228d
1 changed files with 6 additions and 0 deletions
|
@ -222,9 +222,15 @@ static int hostapd_config_read_eap_user(const char *fname,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (os_strncmp(fname, "sqlite:", 7) == 0) {
|
if (os_strncmp(fname, "sqlite:", 7) == 0) {
|
||||||
|
#ifdef CONFIG_SQLITE
|
||||||
os_free(conf->eap_user_sqlite);
|
os_free(conf->eap_user_sqlite);
|
||||||
conf->eap_user_sqlite = os_strdup(fname + 7);
|
conf->eap_user_sqlite = os_strdup(fname + 7);
|
||||||
return 0;
|
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");
|
f = fopen(fname, "r");
|
||||||
|
|
Loading…
Reference in a new issue