questions about module rlm_perl
hak at cooper.edu
Thu Feb 19 20:39:17 CET 2015
Working with version 2.2.6, two questions about rlm_perl, perhaps these
belong on the developers list?
1: Why is this module unable to set items on the CONFIG list?
Looking in the source code rlm_perl.c at function rlmperl_call,
the hashes RAD_REPLY,RAD_CHECK,RAD_CONFIG,RAD_REQUEST,RAD_REQUEST_PROXY
and RAD_REQUEST_PROXY_REPLY are all pre-loaded with the value pairs from
the corresponding lists before the perl subroutine (e.g. authorize) is
called. After the subroutine returns, all of these hashes are examined and
the values put back into the radiusd value pairs, except RAD_CONFIG.
I have worked around it, but why can't this module do this?
2: The detach subroutine is a placebo. It doesn't get called during SIGHUP
processing because in main/modules.c, before reloading a module, the code
checks to see if the RLM_TYPE_HUP_SAFE flag is set. rlm_perl.c does not
set this flag. There are some sketchy areas of the perl_detach function
so maybe this didn't work or caused crashes? Again, I can work around it
but it would have been nice to hook SIGHUP and take certain actions, e.g.
suppose your Perl module has additional config stuff that needs to be reloaded.
More information about the Freeradius-Users