Hi, Is there an example for dynamic expansion with perl in unlang? Something like this, but using perl instead of regex and SQL: if ("%{request:User-Name}" =~ /^(.*)@/) { update reply { Reply-Message := "%{sql:select(concat('Stripped-User-Name: ','%{1}',', random value: ',rand()))}" } } On a side note, in RHEL6's freeradius-perl RPM, rlm_perl is unusable: Can't load '/usr/lib64/perl5/auto/Data/Dumper/Dumper.so' for module Data::Dumper: /usr/lib64/perl5/auto/Data/Dumper/Dumper.so: undefined symbol: Perl_sv_cmp at /usr/lib64/perl5/XSLoader.pm line 70. -- Fajar
On 03/18/2011 12:39 PM, Fajar A. Nugraha wrote:
On a side note, in RHEL6's freeradius-perl RPM, rlm_perl is unusable: Can't load '/usr/lib64/perl5/auto/Data/Dumper/Dumper.so' for module Data::Dumper: /usr/lib64/perl5/auto/Data/Dumper/Dumper.so: undefined symbol: Perl_sv_cmp at /usr/lib64/perl5/XSLoader.pm line 70.
Not sure, but this sounds like the same issue discussed here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=416266 Please file a bug report at bugzilla.redhat.com Thank you -- John Dennis <jdennis@redhat.com> Looking to carve out IT costs? www.redhat.com/carveoutcosts/
On 03/18/2011 12:39 PM, Fajar A. Nugraha wrote:
On a side note, in RHEL6's freeradius-perl RPM, rlm_perl is unusable: Can't load '/usr/lib64/perl5/auto/Data/Dumper/Dumper.so' for module Data::Dumper: /usr/lib64/perl5/auto/Data/Dumper/Dumper.so: undefined symbol: Perl_sv_cmp at /usr/lib64/perl5/XSLoader.pm line 70.
This was filed as https://bugzilla.redhat.com/show_bug.cgi?id=689045 I finally tracked this down and since it affects other people building 2.1.10 I thought I would pass along the info. Alan please also note there is a git formatted patch attached against the v2.1.x git branch and I think you also need to run autogen.sh again (see below). It turns out the fix is to use lt_dladvise* and Alan checked in a fix for it on 12/9/2009 in commit 7115d751. However that code does not get turned on unless HAVE_LT_DLADVISE_INIT is defined. Alan checked in a fix on 8/6/2010 in commit 323229c2 which added the check for lt_dladvise in configure.in and if found sets HAVE_LT_DLADVISE_INIT opps, but not really the actual symbol which was defined was HAVE_HAVE_LT_DLADVISE_INIT (note the extra HAVE_) This was corrected on 1/7/2011 in commit 03993758. So if you modify HAVE_HAVE_LT_DLADVISE_INIT to be HAVE_LT_DLADVISE_INIT in the 2.1.10 tree, run configure again you should pick up the lt_dladvise fixes right? Wrong. Why? Because src/include/autoconf.h.in which configure rewrites as src/include/autoconf.h does not have the HAVE_LT_DLADVISE_INIT symbol in it. Why? Because autoheader was not rerun after modifying configure.in. According to the git log it appears as if the headers were last updated on 1/29/2009, about two years ago. So the answer is to run autogen.sh right? Sort of, except autogen.sh has a bug in it which causes it to exit prematurely before it's performed 90% of its work (it misses updating *all* the modules although it does update src/include/autoconf.h.in). The fix for this is in the attached 0001-Fix-autogen.sh-the-script-is-invoked-with-e-which-ca.patch. So what do you need to do if you want to enable lt_dladvise in 2.1.10? 1) change HAVE_HAVE_LT_DLADVISE_INIT to HAVE_LT_DLADVISE_INIT 2) patch autogen.sh so it doesn't exit prematurely (not strictly necessary for lt_dladvise, but a good idea, who knows what else was getting missed because of it) 3) run autogen.sh 4) do the configure, make, & install dance Note, steps 1&2 are implemented in attached freeradius-lt-dladvise.patch Alan: I think you need to apply 0001-Fix-autogen.sh-the-script-is-invoked-with-e-which-ca.patch, then run autogen.sh, and then do a git commit. HTH, John -- John Dennis <jdennis@redhat.com> Looking to carve out IT costs? www.redhat.com/carveoutcosts/
John Dennis wrote:
I finally tracked this down and since it affects other people building 2.1.10 I thought I would pass along the info. Alan please also note there is a git formatted patch attached against the v2.1.x git branch and I think you also need to run autogen.sh again (see below).
OK. I've added the "autogen" patch, and regenerated autoconf.h.in. The fixes for HAVE_HAVE... were already in configure.in for the v2.1.x branch. Alan DeKok.
participants (3)
-
Alan DeKok -
Fajar A. Nugraha -
John Dennis