Missing User-Name attribute causing a segfault in attr_rewrite

dskinner at bluefrog.com dskinner at bluefrog.com
Sat May 6 01:23:40 CEST 2006

Quoting Alan DeKok <aland at nitros9.org>:
> Dennis Skinner <dskinner at bluefrog.com> wrote:
>> Any luck with this, Alan?  Need any other info from me?  Should I open a
>> bug report in bugzilla?
>  Try the following:
>> > #5  0x400e24f7 in preprocess_authorize (instance=0x0, request=0x8161638)
>> > at rlm_preprocess.c:550
>  That line in rlm_preprocess.c looks at request->username->strvalue.
> Try editing the radlog() to "if (request->username) radlog(...".
>  Re-build & install.  Maybe that will help.

That seems to have done it.  I recompiled and ran that change on our 
secondary and when the primary received a bad packet and died, the 
secondary then got one and kept going.  I put the modified version on 
the primary and it seems to be working well so far.  I've seen a couple 
of these in the log now:

Fri May  5 18:50:44 2006 : Error: rlm_sql (sql2): zero length username 
not permitted
Fri May  5 18:50:44 2006 : Auth: Invalid user: [<no User-Name 
attribute>/] (from client xxxxx port 108 cli xxxxxxxxxx)

I included the "return r;" inside the new if statement.  Not sure if 
that is correct.  Maybe the request->username should be &&'ed to the 
outer if?

Thanks, Alan!

Dennis Skinner
Systems Administrator
BlueFrog Internet

This message was sent using BlueFrog's Webmail System

More information about the Freeradius-Users mailing list