regexp in authorize-File with FR3

Anja Ruckdaeschel Anja.Ruckdaeschel at rz.uni-regensburg.de
Tue Sep 1 15:58:45 CEST 2015


Hi there,

I use a lot of regex in the users - File in FR2.
With FR3 it seems the regex in the authorize-File is compared as simple string.

 ....
Tue Sep  1 14:56:10 2015 : Debug: ^(\.*)([a-zA-Z]{3}[0-9]{5})
Tue Sep  1 14:56:10 2015 : Debug: Parsed xlat tree:
Tue Sep  1 14:56:10 2015 : Debug: literal --> ^(\.*)([a-zA-Z]{3}[0-9]{5})
Tue Sep  1 14:56:10 2015 : Debug: (0) files: EXPAND ^(\.*)([a-zA-Z]{3}[0-9]{5})
Tue Sep  1 14:56:10 2015 : Debug: (0) files:    --> ^(\.*)([a-zA-Z]{3}[0-9]{5})
....

... and it never matches.

This post says, that is was removed "on non string
attributes" in v3.0.x:
http://lists.freeradius.org/pipermail/freeradius-users/2015-April/076848.html 

I'd like to use them on the User-Name-Attribute:

User-Name =~ "^(\.*)([a-zA-Z]{3}[0-9]{5})"

But User-Name is a string, isn't it?

dictionary.rfc2865:ATTRIBUTE    User-Name                               1       string

So the question is: Did you remove regex completely from the files module and I need to do it with unlang or is there another notation for this one?

Thank you for your time,

Ciao Anja






More information about the Freeradius-Users mailing list