config section in rlm_perl module
Peter Balsianok
balsianok.peter at gmail.com
Sat Apr 18 13:05:09 CEST 2015
Hi,
I am not able to use %RAD_PERLCONF during parsing phase of radius.pm. I
understand why, because section config (rlm_perl) is parsed after parsing
radius.pm itself. Therefore i am able to set up global constant based on
freeradius configuration.
Is it correct behaviour ?
Piece of radius.pm code:
...
# Hashes with request / reply parameters
use vars qw(%RAD_PERLCONF %RAD_REQUEST %RAD_REPLY %RAD_CHECK
%RAD_REQUEST_PROXY %RAD_REQUEST_PROXY_REPLY);
use constant LOG_DIR => $RAD_PERLCONF{'logdir'};
(line 47) use constant LOG_FILENAME =>
LOG_DIR().$RAD_PERLCONF{'name'}.'.gen';
use constant RADIUS_RADDB_DIR => $RAD_PERLCONF{'confdir'};
...
Debug output (freeradius 3.0.7):
....
radiusd: #### Instantiating modules ####
instantiate {
# Loaded module rlm_perl
# Instantiating module "perl" from file ./mods-enabled/perl
perl {
filename = "./mods-config/perl/radius.pm"
func_authorize = "authorize"
func_authenticate = "authenticate"
func_post_auth = "post_auth"
func_accounting = "accounting"
func_preacct = "preacct"
func_checksimul = "checksimul"
func_detach = "detach"
func_xlat = "xlat"
func_pre_proxy = "pre_proxy"
func_post_proxy = "post_proxy"
func_recv_coa = "recv_coa"
func_send_coa = "send_coa"
}
Use of uninitialized value in concatenation (.) or string at
./mods-config/perl/radius.pm line 47, <DATA> line 751.
rlm_perl (perl): parsing 'config' section...
config {
logdir = /app_log/radius/auth/
confdir = ./
name = auth
}
rlm_perl (perl): done parsing 'config'.
More information about the Freeradius-Users
mailing list