[PATCH] rlm_sql_sqlite sql_select_query
Etienne Champetier
etienne.champetier at free.fr
Mon Feb 28 21:47:32 CET 2011
Hello
I was trying to get the sqlite module to work and i had to modify the code to get it work
(else i've got rlm_sql_sqlite: sqlite3_step = 21 where 21 is misuse).
I've just tested authorize and client (select only, no update, insert or delete) and it work fine (I haven't tested accounting yet).
Here is my simple patch
Signed-off-by: Etienne CHAMPETIER <etienne.champetier at free.fr>
----------------------------------------------------
diff --git a/src/modules/rlm_sql/drivers/rlm_sql_sqlite/sql_sqlite.c b/src/modules/rlm_sql/drivers/rlm_sql_sqlite/sql_sqlite.c
index 14466d9..d7bd2b9 100644
--- a/src/modules/rlm_sql/drivers/rlm_sql_sqlite/sql_sqlite.c
+++ b/src/modules/rlm_sql/drivers/rlm_sql_sqlite/sql_sqlite.c
@@ -138,10 +138,7 @@ static int sql_query(SQLSOCK * sqlsocket, SQL_CONFIG *config, char *querystr)
static int sql_select_query(SQLSOCK *sqlsocket, SQL_CONFIG *config,
char *querystr)
{
- if (strstr(querystr, "nas") != NULL)
- return sql_query(sqlsocket, config, querystr);
-
- return 0;
+ return sql_query(sqlsocket, config, querystr);
}
More information about the Freeradius-Devel
mailing list