Pattern Matching in users file

Garber, Neal Neal.Garber at energyeast.com
Fri Sep 15 21:50:51 CEST 2006


I have the following entry in my users file:

 

DEFAULT         Cisco-AVPair =~ "ssid=(.*)", Group := "%{1}"

 

I added a perl module after files in my authorize section and
data::dumper'ed %RAD_REQUEST, %RAD_CHECK and %RAD_CONFIG for debugging
purposes.  The Cisco-AVPair value in the request is "ssid=EE-Corp".  I
would expect that the value of Group would be "EE-Corp".  Instead, the
value of Group was "(.*)".  I tried using backticks around the %{1}.  I
tried "=" as opposed to ":=".  

 

Also, the Group attribute was added to %RAD_CHECK as opposed to
%RAD_REQUEST (Group was not an attribute in the original request).  This
prevented me from using module checkval to test it.  I ended up using
the attr_rewrite module to change Cisco-AVPair so it could be tested by
checkval..  

 

So, if it's supported, what is the syntax for regex pattern matching and
substitution in the users file?  Also, if it's possible, what is the
syntax to create a new request attribute in the users file?

 

Thank you for creating/supporting/maintaining the best and most flexible
Radius server.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20060915/3ced08ea/attachment.html>


More information about the Freeradius-Users mailing list