Freeradius-Users post from santoro.ice at gmail.com requires approval

Marcelo Santoro santoro.ice at gmail.com
Mon Jan 12 17:31:22 CET 2015


Alan… please… can you give me an example how to use:
> %sql{} stuff in a %{eval:} statement.

or

> if(%sql{}) statement

Tks so much friend.

Best Regards
Marcelo Santoro


> Em 12/01/2015, à(s) 13:27, A.L.M.Buxey at lboro.ac.uk escreveu:
> 
> Hi,
> 
>> I am using the follow Post-Auth Command:
>> 
>>        update request {
>>                Tmp-Integer-0 := "%{sql: UPDATE acessos_clientes set con_id = (select con_id from concentradores where con_ip = '%{Nas-IP-Address}'), ace_last_ip = '%{reply:Framed-IP-Address}' where ace_login = '%{SQL-User-Name}'}"
>>        }
> 
> so the UPDATE returns no value....so Tmp-Integer-0 isnt set to anything...thus fails....
> 
> so, a quick guess or 2....you can either wrap up the %sql{} stuff in a %{eval:} statement....or, you
> can change the thing....are you even using the Tmp-Integer-0 string? why are you updating the request?
> to be an 
> 
> if(%sql{}) statement instead....  the SQL will be run...you can then look at the result and work on that.
> 
> running external script is extreme performance hit..running PERL not so..but still big hit
> 
> alan
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list