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




This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.