It's not a real language, honest

Wichert Akkerman wichert at wiggy.net
Mon May 28 15:53:00 CEST 2007


Previously Alan Dekok wrote:
> Arran Cudbard-Bell wrote:
> > if ("%{User-Name}" =~ /^bob/) {
> > 	update config {
> > 		Proxy-To-Realm = "bob_realm"
> > 	}
> > }
> > ?
> 
>   Almost:
> 
> if ("%{User-Name}" =~ /^(.*)@(example.com)$/) {
> 	update config {
> 		Proxy-To-Realm := "%{2}"
> 	}
> 	update request {
> 		Stripped-User-Name := "%{1}"
> 		Realm := "%{2}"
> 	}
> }

Does this mean that you will have to duplicate that or use a much more
complex expression to allow both user at realm and realm/user syntaxes
for a realm? That would be slightly inconvenient.

Wichert.

-- 
Wichert Akkerman <wichert at wiggy.net>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.



More information about the Freeradius-Devel mailing list