rlm_perl hook for prepaid voip radius, RT#4100
authorivan <ivan>
Fri, 24 Oct 2008 19:54:11 +0000 (19:54 +0000)
committerivan <ivan>
Fri, 24 Oct 2008 19:54:11 +0000 (19:54 +0000)
fs_selfservice/FS-SelfService/SelfService.pm
fs_selfservice/FS-SelfService/SelfService/FreeRadiusVoip.pm

index 956b594..cba85e0 100644 (file)
@@ -16,10 +16,6 @@ $VERSION = '0.03';
 
 $DEBUG = 0;
 
-#you can add BEGIN { $FS::SelfService::skip_uid_check = 1; } 
-#if you grant appropriate permissions to whatever user
-$skip_uid_check = 0;
-
 $dir = "/usr/local/freeside";
 $socket =  "$dir/selfservice_socket";
 $socket .= '.'.$tag if defined $tag && length($tag);
@@ -76,6 +72,8 @@ $ENV{'CDPATH'} = '';
 $ENV{'ENV'} = '';
 $ENV{'BASH_ENV'} = '';
 
+#you can add BEGIN { $FS::SelfService::skip_uid_check = 1; } 
+#if you grant appropriate permissions to whatever user
 my $freeside_uid = scalar(getpwnam('freeside'));
 die "not running as the freeside user\n"
   if $> != $freeside_uid && ! $skip_uid_check;
index 0ab4f14..47a2bfa 100644 (file)
@@ -1,7 +1,9 @@
-# Add this to the modules section of radiusd.conf
-#  #path to this module
-#  module=/usr/local/share/perl/5.8.8/FS/SelfService/FreeRadiusVoip.pm
-#  func_autheenticate = authenticate
+#Add this to the modules section of radiusd.conf
+# perl {
+#   #path to this module
+#   module=/usr/local/share/perl/5.8.8/FS/SelfService/FreeRadiusVoip.pm
+#   func_authenticate = authenticate
+# }
 #
 #In the Authorize section 
 #Make sure that you have 'files' uncommented. Then add a line containing 'perl'
 # and then add 
 #  DEFAULT Auth-Type = Perl 
 #  Fall-Through = 1 
+#
+# and on debian systems, add this to /etc/init.d/freeradius, with the
+# correct path (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=416266)
+#               LD_PRELOAD=/usr/lib/libperl.so.5.8.8
+#               export LD_PRELOAD
 
 BEGIN { $FS::SelfService::skip_uid_check = 1; }