Where can the regular expressions discussed in 'doc/variables.txt' be used ? I'd like to modify the User-Name attribute as passed in for use as a filter for rlm_ldap.


For example, during an EAP-TLS, I get an EAP packet like this:

NAS-IP-Address = ...
NAS-Port-Type = Async
User-Name = "host/g21476.fo.bar"
Service-Type = Framed-User
Framed-MTU = 1500
Calling-Station-Id = ...
State = ...
EAP-Message = ...
Message-Authenticator = ...


I'd like to strip off the 'host/' from User-Name and use that as a filter in rlm_ldap for the authorize step, like:


ldap {
...
User-Name =~ "^([^/]+)/(.*)"
filter = "(cn=`%{2}`)"
...
}
That fails horribly (cn='') so I'm not sure where those types of regex statements can be used in radiusd.conf.


Is that possible or am I completely misunderstanding variables.txt ?
I'm running FreeRADIUS built from CVS as of 4/21/04.

Thanks,
Craig

PS Forgive the wandering nature of this e-mail, 12+ hours at work...



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

Reply via email to