rlm_perl question (was Re: General question about authentication/authorization)

George C. Kaplan gckaplan at ack.berkeley.edu
Sat Mar 18 20:40:33 CET 2006


On Mar 18, 2006, at 7:13 AM, Alan DeKok wrote:

> Boian Jordanov <bjordanov at orbitel.bg> wrote:
>> So, why were %RAD_CHECK and %RAD_REQUEST
>>> made read-only?
>>
>> Because perl hashes are not ordered.
>
>   The only requirement is that attributes of the same name be ordered.
>
>   This may change the way the module works (I haven't looked), but if
> ${RAD_REQUEST}{'attribute'} was an array of values rather than a
> scalar, that should allow the hash to be writable.

That is how the module works for multi-valued attributes:  $ 
{RAD_REQUEST}{'attribute'} is a ref to an array.

For single-valued attributes, it's just the attribute value.  So  
you'd have to be careful if you're adding values to an attribute that  
starts out with a single value, but it sounds like it should work.

-- 
George C. Kaplan                            gckaplan at ack.berkeley.edu
Communication & Network Services            510-643-0496
University of California at Berkeley




More information about the Freeradius-Users mailing list