Filter multivalued attributes in rlm_sql
JUND, Aurélien
aurelien.jund at sfr.com
Mon Jul 12 12:50:14 CEST 2010
Dear All,
I would like to filter the Callback_Number in order to use it for my mysql authorisation request
When I use :
sql_user_name = "%{reply:Callback-Number}"
I always get the first value of the Callback-Number, but I would like to use only the one starting with "TEST=". Is there a way to filter a multivalued atytribute to use it for the sql_user_name?
Logs:
#Here I fetch the ldap directory where is store the attributes
Jul 12 12:23:02 radius-wifi1-aub freeradius[7990]: [ldapClear] looking for check items in directory...
Jul 12 12:23:02 radius-wifi1-aub freeradius[7990]: rlm_ldap: SFRuserPassword -> Cleartext-Password == "xxx"
Jul 12 12:23:02 radius-wifi1-aub freeradius[7990]: rlm_ldap: SFRlogin -> User-Name == "toto"
Jul 12 12:23:02 radius-wifi1-aub freeradius[7990]: [ldapClear] looking for reply items in directory...
#As the attribute I search is multivalued I used the += operator to get all the values
Jul 12 12:23:02 radius-wifi1-aub freeradius[7990]: rlm_ldap: SFRserviceId -> Callback-Number =~ "ID=728277507"
Jul 12 12:23:02 radius-wifi1-aub freeradius[7990]: rlm_ldap: SFRserviceId -> Callback-Number =~ "TEST=0603079410"
Jul 12 12:23:02 radius-wifi1-aub freeradius[7990]: rlm_ldap: SFRserviceId -> Callback-Number =~ "REF=1020589"
Jul 12 12:13:28 radius freeradius[7915]: rlm_ldap: login -> User-Name == "toto"
Jul 12 12:13:28 radius freeradius[7915]: [ldapClear] looking for reply items in directory...
Jul 12 12:13:28 radius freeradius[7915]: rlm_ldap: serviceId -> Callback-Number =~ "ID=728277503"
Jul 12 12:13:28 radius freeradius[7915]: rlm_ldap: serviceId -> Callback-Number =~ "TEST=603075433"
Jul 12 12:13:28 radius freeradius[7915]: rlm_ldap: serviceId -> Callback-Number =~ "REF=1020197"
+++[ldapClear] returns ok
Jul 12 12:23:02 radius-wifi1-aub freeradius[7990]: [sql_crm_abv] #011expand: %{reply:Callback-Number} -> ID=728277503
#for the return of sqlècrm_abv I would like to get %{reply:Callback-Number} -> TEST=0603079410
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20100712/07320cf3/attachment.html>
More information about the Freeradius-Users
mailing list