freeradius: rlm_perl has symbol lookup errors when loading additional perl modules

Enrik Berkhan enrik#freeradius at
Thu Jul 5 15:06:29 CEST 2007


I've investigated this bug and found the reason why perl .so's won't
load via shared rlm_perl on Debian.

rlm_perl will be loaded by freeradius via lt_dlopenext() which proxies
to dlopen(). rlm_perl depends on libperl. Thus, libperl will be loaded
indirectly by dlopen() using the same flags specified to dlopen() by
lt_dlopenext(). On debian, this means, libperl will be loaded _without_
RTDL_GLOBAL being set.

On the other hand, when the embedded script tries to load a shared perl
extension like Data::Dumper, perl's extension mechanisms will load But does _not_ depend on libperl, so the dlopen()
used to load will

1. not search for symbols in libperl explicitly and

2. not see the symbols from libperl loaded earlier indirectly by
lt_dlopenext(), because RTLD_GLOBAL is disabled on debian for valid
reasons (see bug #195821).

I'm not sure, but I think the correct solution would be to have a shared
library dependency from all perl extension modules like on

BTW, a workaround is to start radiusd with LD_PRELOAD=...libperl...
pointing to the correct libperl. Of course, this is not feasible for
packaging ...


More information about the Freeradius-Devel mailing list