sql expansion with query string stored in attribute?

Fajar A. Nugraha list at fajar.net
Wed Oct 19 08:50:20 CEST 2011


On Wed, Oct 19, 2011 at 1:45 PM, Alan DeKok <aland at deployingradius.com> wrote:
> Fajar A. Nugraha wrote:
>> Is it possible to use sql expansion with query stored in a radius
>> attribute (e.g. Tmp-String-0)?
>
>  Not currently.

I was afraid of that :)

>
>> For example, I have something like this to store my local
>> configuration variables:
>>
>> local-config {
>> sql-now="select concat('Current time = ',now())"
>> }
>
>  You can use that as a *load-time* expansion, via ${...}.   But it
> means you can't change it at run-time.

Yes, which is what Test2 does, and it works correctly.

>
>  That's mainly used to abstract configuration on different machines.
>
>> Is there a way to change which characters remain unencoded? Thanks.
>
>  That's what "safe_characters" is for.

In dialup.conf? Yes, but it doesn't seem to work when the query is
stored in an attribute. Looks like sql_xlat is responsible for this?

Thanks

-- 
Fajar




More information about the Freeradius-Users mailing list