[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: |
Georges Arnould |
Subject: |
Re: [Help-gnu-radius] User-Name containing an empty string. |
Date: |
Fri, 26 Nov 2004 10:40:52 +0100 |
He he !
Many thanks Sergey, this is a cleanest way to do it than mine !
Would you include this patch in the next release on Gnu-radius so that I can
count on the "feature" ?
Last question : was there any goal into calling hints_setup() after the
user_name check or not ?
Many thanks !
Georges
----- Original Message -----
From: "Sergey Poznyakoff" <address@hidden>
To: "Georges Arnould" <address@hidden>
Cc: <address@hidden>
Sent: Friday, November 26, 2004 9:48 AM
Subject: Re: [Help-gnu-radius] User-Name containing an empty string.
> 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
>