Issues with bug#235
I've been working to merge our auth and acct configs into one (previously we ran each on separate servers), and I am hitting bug#235. I snagged the rlm_sql.c changes from CVS and rebuilt 1.1.2. My sql.conf config looks like: sql sqlX { deletestalesessions = no simul_count_query = "select count(*) from radacct where ..." simul_verify_query = "select ... from radacct where ..." } Looking at rlm_sql.c (near line 1386 in the CVS head), we see: if (inst->config->deletestalesessions == FALSE || inst->config->simul_verify_query[0] == '\0') { sql_release_socket(inst, sqlsocket); return RLM_MODULE_OK; } Since the deletestalesessions check evaluates to true, the code never enters the section to verify any of the sessions found. This changes the behavior from all FreeRADIUS releases. Should this be fixed, is this the desired result, or am I forgetting something simple? Kevin Bonner
On Monday 03 July 2006 12:49, Kevin Bonner wrote:
Should this be fixed, is this the desired result, or am I forgetting something simple?
I've submitted bug#373 with a patch that should fix this behavior. I made the same changes that the poster of bug#235 had in his patch. The CVS diff for revision 1.147 of rlm_sql.c also changed the default value of deletestalesessions from no to yes. IMO, nothing should be deleted without making the user configure it that way. None of these changes are in any stable release yet, so hopefully some discussion can occur before these changes are included in an official release. Kevin Bonner
Kevin Bonner wrote:
The CVS diff for revision 1.147 of rlm_sql.c also changed the default value of deletestalesessions from no to yes. IMO, nothing should be deleted without making the user configure it that way. None of these changes are in any stable release yet, so hopefully some discussion can occur before these changes are included in an official release.
The default raddb/sql.conf has "deletestalesessions = yes" therefore I changed rlm_sql.c to use the same value as the config file for more consistency. (I don't like to have different default values in the config files and the source code) I note the current stable version doesn't even use the value of the option, and from my understanding it's always deleting stale sessions. If you want to change the current behaviour to "no", then you need to change it in both source code and config files. -- Nicolas Baradakis
participants (2)
-
Kevin Bonner -
Nicolas Baradakis