variable expansions in Reply-Message

Isidor Zeuner radius at quidecco.de
Mon Apr 19 13:05:27 CEST 2010


> Isidor Zeuner wrote:
> > The problem with the unlang manpage is that it doesn't make it
> > very clear _when_ the expansions are processed.
> 
>   The expansion gets processed when the attribute is processed.  It
> can't be earlier, because the attribute doesn't exist.  It can't be
> later, because then the *later* expansions wouldn't work.
> 

Ok. I was just unsure if it this also holds when the attribute comes
from a source external to the configuration files, like an SQL query.

>   i.e.  Foo = "%{User-Name}"
> 	Bar = "%{Foo}".
> 
>   What's "Bar"?  It's not %{User-Name}.
> 

Interpreting this as a configuration file snippet, I fully agree. I
just need to find out how the processing of the SQL results map into
that. In the "DATA TYPES" section of the manpage, the distinction
between single-quoted, double-quoted and back-quoted strings is pretty
clear. Now the expansion behaviour on the SQL results which I am used
to from FreeRADIUS 1.1 is probably the same as the double-quoted
string expansion behaviour. Yet I do not get SQL results to be
expanded on FreeRADIUS 2.1, no matter if I store them unquoted or
double-quoted.

> > Variables are
> > definitely expanded before the SQL server receives queries, as the
> > query templates use variables. I get the impression that the
> > expansions are not processed anymore on the SQL results.
> 
>   I don't see why.  That part of the code hasn't changed for a long time.
> 

Ok, thanks. I was just wondering because FreeRADIUS 1.1 _has_ already
been existing for a long time.

So I only need to look at the code which could interfere with the
expansion behaviour somehow, and which might have changed meanwhile.

Best regards,

Isidor



More information about the Freeradius-Users mailing list