Reverse string concatenation for multiple attributes

Arran Cudbard-Bell a.cudbardb at freeradius.org
Thu Dec 10 20:27:27 CET 2015


>  .. It seems to indicate predefinition in a module, which is ok but your example looks more inline. I am guessing the sql bit matches the module instance name here and the query is loaded in a variable?

Or an xlat.  It's a polymorphic template type meaning it can be an attribute reference as you have below, an xlat expansion like "SELECT * FROM BLAH WHERE user = %{user-Name}", an exec `echo 'SELECT * FROM BLAH'`, or just a plain literal like 'SELECT * FROM BLAH WHERE 1'

> Would an xlat type section be therefore
> 
> Map sql_instname &var {
>                Control:Tmp-string-0 += myfieldname
> }
> 
> Or am i way out and it needs module definition?

Nope that's good.

Then

update request {
	Tmp-String-0 := "%{pairs:&control:Tmp-String-0[*]}"
}

To recombine into a list of comma delimited value pairs.

-Arran

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS development team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20151210/c5c6e7e3/attachment.sig>


More information about the Freeradius-Users mailing list