User-Name containing a $

Lovaas,Steven Steven.Lovaas at ColoState.EDU
Tue Jul 23 05:12:58 CEST 2013


Alan,

You've reminded me of a question I've been meaning to ask.

Your previous answer gives an example using the unlang regex syntax, including the case-insensitive operator at the end. But I was hoping to find an elegant way to do case-insensitive matching in proxy.conf, where the comments admit that the syntax breaks the rules of unlang regex matching. Putting an 'I' at the end hasn't worked for me.

I'd love to do  this:
realm "~FOO\\.EDU$"i {
	stuff here
}

Is the case-insensitive behavior supported in proxy.conf?

Thanks,
Steve

-----Original Message-----
Alan sagely explained:

use unlang regex check...you'll need to escape the "$" as thats end of line for regex. hosts should be matched with eg

if (User-Name =~ /^host\/.*\\.YOUR\\.AD\\.REALM$/i) {
	stuff goes here
	}

alan
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list