rlm_perl changing User-Name and proxy requests

Ti Leggett leggett at mcs.anl.gov
Fri Jan 11 22:41:53 CET 2013


On Jan 11, 2013, at 3:21 PM, Arran Cudbard-Bell <a.cudbardb at freeradius.org> wrote:

> @leggett
> 
> If you don't mind rebuilding the server, could you change:
> 
> https://github.com/FreeRADIUS/freeradius-server/blob/v2.x.x/src/main/modcall.c#L686
> 
> And add:
> 
> RDEBUG("Cached username is \"%s\", list username is \"%s\"", request->username->vp_strvalue, pairfind(request->packet->vps, PW_USER_NAME)->vp_strvalue);
> 
> Just after modcall_single()
> 
> Run it in debug mode and you'll see exactly where the username isn't being updated. List username and cached username should always be in sync up until the call to suffix, at which point the cached username should be stripped of the realm.

Ok. I'm flumoxed:

+- entering group pre-proxy {...}
[pre_proxy_log]         expand: /var/log/radius/radacct/%{Client-IP-Address}/pre-proxy-detail-%Y%m%d -> /var/log/radius/radacct/192.168.1.1/pre-proxy-detail-20130111
[pre_proxy_log] /var/log/radius/radacct/%{Client-IP-Address}/pre-proxy-detail-%Y%m%d expands to /var/log/radius/radacct/192.168.1.1/pre-proxy-detail-20130111
[pre_proxy_log]         expand: %t -> Fri Jan 11 15:38:05 2013
Cached username is "ti.leggett", list username is "ti.leggett at crypto.example.com"
++[pre_proxy_log] returns ok
Sending Access-Request of id 217 to 192.168.1.2 port 1812
        NAS-Port-Type = Virtual
        Service-Type = Authenticate-Only
        Calling-Station-Id = "host.division.example.com"
        User-Name = "leggett"
        User-Password = "password"
        NAS-Identifier = "sshd"
        NAS-IP-Address = 192.168.1.1
        NAS-Port = 9975
        Proxy-State = 0x3831



More information about the Freeradius-Users mailing list