Multi-domain AD and Users Who Aren't So Bright
    Phil Mayers 
    p.mayers at imperial.ac.uk
       
    Fri Feb  3 18:19:45 CET 2012
    
    
  
On 02/03/2012 04:56 PM, NdK wrote:
> There must be a misunderstanding. I'm not asking advice about the query
> itself (that would be OT here).*Given*  that the query should (and that
> 'should' is not FR-related) return a 4-rows answer that I must translate
> to a single row, how do I translate it to a single value in FR?
> Currently I'm doing that translation spawning two more processes, that
> might not be needed.
Munge the output into one line, using a separator character that won't 
ever be in your input:
foo~bar~baz
...then use a regexp:
update request {
  Tmp-String-0 = "%{exec:...}
}
if (Tmp-String-0 =~ /^(.+)~(.+)~(.+)$/) {
   update request {
     My-Foo = "%{1}"
     My-Bar = "%{1}"
     My-Baz = "%{1}"
   }
}
    
    
More information about the Freeradius-Users
mailing list