Regular expressions doesn't work in /etc/raddb/hints
Hi, We are migrating from other RADIUS software to FreeRADIUS. In order to avoid changing existing users database objects, I'm trying to fix the User-Name attribute format in NAS request and it seems that preprocess module is the right place to do that. But after adding new default rule in the hints file I have discovered that it doesn't work. The rule is always matching my regular expression no matter what string I put into it. The regular expression is simply the string itself i.e. like "/string/". After looking through sources I found that in src/lib/valuepair.c in pairmove the operator T_OP_REG_EQ is commented out. Could it be the culprit or is there anything else that I should know? The FreeRADIUS version is 2.1.3 on SLES 10 compiled from sources. Best regards, Victor Shkamerda
Victor Shkamerda wrote:
Hi,
We are migrating from other RADIUS software to FreeRADIUS. In order to avoid changing existing users database objects, I'm trying to fix the User-Name attribute format in NAS request and it seems that preprocess module is the right place to do that. But after adding new default rule in the hints file I have discovered that it doesn't work. The rule is always matching my regular expression no matter what string I put into it. The regular expression is simply the string itself i.e. like "/string/". After looking through sources I found that in src/lib/valuepair.c in pairmove the operator T_OP_REG_EQ is commented out. Could it be the culprit or is there anything else that I should know? The FreeRADIUS version is 2.1.3 on SLES 10 compiled from sources.
This should be fixed in 2.1.4. Alan DeKok.
On 2/12/2009 at 9:29 PM, in message <499478AC.6040009@deployingradius.com>, Alan DeKok <aland@deployingradius.com> wrote: Victor Shkamerda wrote: Hi,
We are migrating from other RADIUS software to FreeRADIUS. In order to avoid changing existing users database objects, I'm trying to fix the User-Name attribute format in NAS request and it seems that preprocess module is the right place to do that. But after adding new default rule in the hints file I have discovered that it doesn't work. The rule is always matching my regular expression no matter what string I put into it. The regular expression is simply the string itself i.e. like "/string/". After looking through sources I found that in src/lib/valuepair.c in pairmove the operator T_OP_REG_EQ is commented out. Could it be the culprit or is there anything else that I should know? The FreeRADIUS version is 2.1.3 on SLES 10 compiled from sources.
This should be fixed in 2.1.4.
I have just tried revision 17581f3d which supposedly should fixed this bug, but it doesn't work either. When I use exact match operator == it works, but when I use regexp match =~ and add slashes accordingly i.e. "/string/" it doesn't match anymore. With best regards, Victor Shkamerda
Victor Shkamerda wrote:
I have just tried revision 17581f3d which supposedly should fixed this bug, but it doesn't work either. When I use exact match operator == it works, but when I use regexp match =~ and add slashes accordingly i.e. "/string/" it doesn't match anymore.
Don't use slashes in the "users" file, or in the "hints" file. Alan DeKok.
On 2/13/2009 at 1:46 PM, in message <49955D98.1060905@deployingradius.com>, Alan DeKok <aland@deployingradius.com> wrote: Don't use slashes in the "users" file, or in the "hints" file.
Thanks, that works. But how do I specify case insensitive match then? With best regards, Victor Shkamerda
participants (2)
-
Alan DeKok -
Victor Shkamerda