Re: Problem with 3Com-User-Access-Level and rlm_perl

This is a discussion on Re: Problem with 3Com-User-Access-Level and rlm_perl within the FreeRADIUS Users forums, part of the Networking and Network Related category; On 2006-11-26 20:25, Alan DeKok wrote: > Krzysztof Olędzki wrote: > >> Like I said ...


Go Back   Usenet Forums > Networking and Network Related > FreeRADIUS Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-26-2006
Krzysztof Olędzki
 
Posts: n/a
Default Re: Problem with 3Com-User-Access-Level and rlm_perl

On 2006-11-26 20:25, Alan DeKok wrote:
> Krzysztof Olędzki wrote:
>
>> Like I said in my first mail: problem with rlm_perl was tested with both
>> freeradius-1.1.2 and 1.1.3. The test with users file was done using
>> version 1.1.3.

>
> Ok... I get enough email that I don't keep track of previous messages
> in a thread.
>
> In any case, the issue is that the VALUE name starts with '3', so
> *any* of the '3Com-*' VALUES get parsed as '3'. The solution is to
> update the VALUE name so it doesn't start with '3'.
>
> Or, update the source code to be a little more intelligent about
> parsing VALUEs


OK, probably found it (src/lib/valuepair.c):

case PW_TYPE_INTEGER:
/*
* If it starts with a digit, it must
* be a number (or a range).
*
* Note that ALL integers are unsigned!
*/
if (isdigit((int) *value)) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vp->lvalue = (uint32_t) strtoul(value, NULL, 10);
vp->length = 4;
}
/*
* Look for the named value for the given
* attribute.
*/
else if ((dval = dict_valbyname(vp->attribute, value)) == NULL){
librad_log("Unknown value %s for attribute %s",
value, vp->name);
return NULL;
} else {
vp->lvalue = dval->value;
vp->length = 4;
}
break;

I'll try to cook a patch.

Pozdrawiam,

Krzysztof Olędzki
--
Krzysztof Olędzki
Axel Springer Polska Sp. z o.o.
tel: +48-22-2320969
fax: +48-22-2325530
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:56 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0