Case-insensitive regexps in rlm_files

Alan DeKok aland at
Thu Nov 18 17:10:40 CET 2010

Brian Candler wrote:
> In rlm_files, I can't see how to make a case-insensitive regular expression.

  You can't.

> -----------------------------------------------------------------
> DEFAULT	User-Name =~ "(?i:foo)"
> 	# nope, not supported by POSIX ERE. Logs:
>  	# "Invalid regular expression (?i:foo)"
> DEFAULT User-Name =~ /foo/i

  That isn't valid.  See "man users".

> Am I missing a trick here?

$ man unlang

  The "users" file has a limited set of functionality.  Extending it
is... awkward.

> If I make a patch for this, would you prefer the first or second to be
> implemented?  The second is nicer to use, but is probably harder to
> implement.

  I'd prefer to avoid the "users" file entirely.  The capability already
exists in the server, in "unlang".  I'd suggest using that.

  Alan DeKok.

More information about the Freeradius-Users mailing list