On Fri, Sep 24, 2004 at 09:39:07AM +0200, Oliver Graf wrote:
> I've upgraded recently from 0.9.3 to 1.0.1. There seems to be one
> small problem in the sql module: a Username seems to be quoted two
> times, first when setting sql_user_name, then when doing the xlat on
> the whole query.
> 
> Am I just missing a config change? From the sample config I can see no
> difference.
> 
> Fix: I use %{User-Name} in the queries instead of %{SQL-User-Name}

Test Command:
 /usr/bin/radtest test#test test localhost 1 testing123 1 127.0.0.1

> Config:
> sql_user_name = "%{User-Name}"
> authorize_check_query = "SELECT id,name,attr,value,op FROM ${authcheck_table} WHERE 
> name = '%{SQL-User-Name}' AND kind = 'user' AND type = 'check' ORDER BY id"
> 
> Debug output:
> radius_xlat:  'test=23test'
> rlm_sql (sql): sql_set_user escaped user --> 'test=23test'
> radius_xlat:  'SELECT id,name,attr,value,op FROM radiususers WHERE name = 
> 'test=3D23test' AND kind = 'user' AND type = 'check' ORDER BY id'
> rlm_sql (sql): Reserving sql socket id: 9
> rlm_sql_mysql: query:  SELECT id,name,attr,value,op FROM radiususers WHERE name = 
> 'test=3D23test' AND kind = 'user' AND type = 'check' ORDER BY id
> rlm_sql (sql): User test=23test not found in radcheck
> 
> Oliver.


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to