group variable

Alexandre Chapellon alexandre.chapellon at mana.pf
Tue Oct 21 02:02:23 CEST 2008



tnt at kalik.net a écrit :
>> Thanks, I saw this, but unfortunaltely whereas in dialup.conf the
>> variable is '%{Sql-Group}', It seems i cannot re-use it outside of an
>> sql module.
>>     
>
> That is probably a bug then. Sql-Group should be available outside sql
> module. I've used it in huntgroups in 1.1.7.
>
>   
>> I have even tried to add an update control directive to add
>> a Tmp-String-0 (correctly expanded in the sql module) at the end of the
>> sql module and so re-use it at the end of the aythorize section (outside
>> sql module), but it doesn't work as it's expanded to an empty string...
>>     
>
> That's OK. unlang doesn't work inside module configuration, only server
> configuration.
>
>   
>>> You need to use lists with attributes in unlang (in this case attribute
>>> is from control list) since default is request.
>>>
>>>       
>> same result with "%{control:Tmp-String-0}".
>>
>>     
>
> Let's try a workaround. Get group name by executing query again in
> authorize section:
>
> update control {
>    Tmp-String-0 := "%{sql:SELECT GroupName FROM radusergroup WHERE
> UserName='%{User-Name}' ORDER BY priority}"
> }
>
> "%{control:Tmp-String-0}" will hold group name then.
>   

This already works .... the goal was to avoid mulplication of sql queries.
But if there is no other solutions.....

thx anyway
> Ivan Kalik
> Kalik Informatika ISP
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20081020/4c773fd0/attachment.html>


More information about the Freeradius-Users mailing list