[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gnu-radius] User-Name containing an empty string.
From: |
Sergey Poznyakoff |
Subject: |
Re: [Help-gnu-radius] User-Name containing an empty string. |
Date: |
Fri, 26 Nov 2004 10:48:19 +0200 |
Georges Arnould <address@hidden> wrote:
> Once my patch finished, I wondered if there was another and smartier way
> to force radiusd to send a Access-Accept answer for null User-Name.
>
> Any idea for me ?
Well, the best way would be to apply the following patch to
radiusd/radius.c:
Index: radiusd/radius.c
===================================================================
RCS file: /cvsroot/radius/radius/radiusd/radius.c,v
retrieving revision 1.77
diff -p -u -r1.77 radius.c
--- radiusd/radius.c 2 Nov 2004 08:55:39 -0000 1.77
+++ radiusd/radius.c 26 Nov 2004 08:48:12 -0000
@@ -473,13 +473,13 @@ radius_respond(REQUEST *req)
radiusd_sql_clear_cache();
+ /* Add any specific attributes for this username. */
+ hints_setup(radreq);
+
if (radreq->request->code == RT_ACCESS_REQUEST
&& rad_auth_check_username(radreq, req->fd))
return 1;
- /* Add any specific attributes for this username. */
- hints_setup(radreq);
-
/* Check if we support this request */
switch (radreq->request->code) {
case RT_ACCESS_REQUEST:
and then to use the following rewrite function:
integer
fake_name()
{
if (!*%[User-Name] || User-Name = "")
%[User-Name] = "fake-user-name";
return 0;
}
Regards,
Sergey