multiple columns in rlm_sql

Alan DeKok aland at deployingradius.com
Mon Apr 16 13:58:34 CEST 2018


> On Apr 16, 2018, at 7:45 AM, <petr.linke at seznam.cz> <petr.linke at seznam.cz> wrote:
> update control {
>    Tmp-String-0 := %{sql:SELECT CONCAT(attribute,'#',value) from database_
> table where...}
> }
> if ( control:Tmp-String-0 =~ /^(\S+)#(.*)$/ ) {
>    update reply {
>         "%{1}" += "%{2}"

  You can't dynamically assign the left side in v3.

  i.e. the left side of an attribute assignment *must* be a fixed string.  All of the examples and documentation show this.

>         test_attribute += "%{2}"

  What's "test_attribute" ?

  The left side of assignments MUST be a known attribute name, taken from the dictionaries.  Again, all of the examples and documentation show this.  Nothing suggests that you can just invent things here.

  Alan DeKok.




More information about the Freeradius-Users mailing list