possible bug in rlm_sql.c
leopold
vova_b at yahoo.com
Thu Sep 24 19:35:44 CEST 2009
It seems like even in the latest release 2.1.7 rlm_sql.c does not handle
"database down" conditions properly.
When calling rlm_sql_fetch_row from underlying driver and it returns result
< 0 which is FAIL condition and not NOT_FOUND condition in this case
rlm_sql should return FAIL and not NOT_FOUND.
For example sql_get_grouplist should fail when DB is down.
We want to differentiate conditions when user is trully "not found" in SQL
DB vs DB is down and in this case the server should not respond.
Will it make sense to do something like this?
531a532
> int ret;
554c555
< while (rlm_sql_fetch_row(sqlsocket, inst) == 0) {
---
> while ((ret=rlm_sql_fetch_row(sqlsocket, inst)) == 0) {
574a576,580
> if (ret < 0)
> {
> /* sql fetch failed */
> num_groups = -1;
> }
--
View this message in context: http://www.nabble.com/possible-bug-in-rlm_sql.c-tp25578009p25578009.html
Sent from the FreeRadius - Dev mailing list archive at Nabble.com.
More information about the Freeradius-Devel
mailing list