configuration parameters for perl module in rlm_perl

Chaigneau, Nicolas nicolas.chaigneau at
Fri Mar 14 15:37:09 CET 2014

Here it is (see attached file "rlm_perl.c").

A few notes:

- I put "//NCH:" markers to identify parts of the code I changed. 

- I didn't bother xlat'ing eventual ${} in "perl_conf" items (didn't need it), but maybe it could be useful.

- I used a "hack" in my struct perl_conf_t: the first item is a pointer to the struct itself.
(this allowed me to get around the bug I found in hash.c. This won't be needed anymore now it's fixed. Anyway, the code works with or without the hash fix)

- I didn't free memory in mod_detach, this should be done... not critical though, since the perl module is not "RLM_TYPE_HUP_SAFE".

Thanks for looking.
I'm interested if you see anything wrong.


> -----Message d'origine-----
> De : freeradius-users-
> at
> [mailto:freeradius-users-
> at] De la
> part de Alan DeKok
> Envoyé : vendredi 14 mars 2014 14:49
> À : FreeRadius users mailing list
> Objet : Re: configuration parameters for perl module in rlm_perl
> Chaigneau, Nicolas wrote:
> > I modified rlm_perl to read the subsection "perl_conf" in
> instantiate, populate a hash, and define a new perl hash passed to the
> perl code whenever a section is called.
> > This hash can be manipulated in the same way as the attribute hashes,
> for instance:
> >
>   That's useful.
> > If people is interested, I can share the code.
> > I have no idea how to submit a git patch though, but I can provide
> the modified file as is.
>   That's fine.  Just mail it to me and I'll take a look.
>   Alan DeKok.
> -
> List info/subscribe/unsubscribe? See
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rlm_perl.c
URL: <>

More information about the Freeradius-Users mailing list