summaryrefslogtreecommitdiff
path: root/fs_selfservice
diff options
context:
space:
mode:
authorivan <ivan>2008-10-24 19:54:11 +0000
committerivan <ivan>2008-10-24 19:54:11 +0000
commit1b7db3fe3d9049141a13721d658747fe2a006859 (patch)
tree366e8685965388f8bfe0aba3c476fa2d91104bb1 /fs_selfservice
parent4508c78eebec13288ab9f93425fa9714133e0a6d (diff)
rlm_perl hook for prepaid voip radius, RT#4100
Diffstat (limited to 'fs_selfservice')
-rw-r--r--fs_selfservice/FS-SelfService/SelfService.pm6
-rw-r--r--fs_selfservice/FS-SelfService/SelfService/FreeRadiusVoip.pm15
2 files changed, 13 insertions, 8 deletions
diff --git a/fs_selfservice/FS-SelfService/SelfService.pm b/fs_selfservice/FS-SelfService/SelfService.pm
index 956b59440..cba85e0db 100644
--- a/fs_selfservice/FS-SelfService/SelfService.pm
+++ b/fs_selfservice/FS-SelfService/SelfService.pm
@@ -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;
diff --git a/fs_selfservice/FS-SelfService/SelfService/FreeRadiusVoip.pm b/fs_selfservice/FS-SelfService/SelfService/FreeRadiusVoip.pm
index 0ab4f1456..47a2bfa78 100644
--- a/fs_selfservice/FS-SelfService/SelfService/FreeRadiusVoip.pm
+++ b/fs_selfservice/FS-SelfService/SelfService/FreeRadiusVoip.pm
@@ -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'
@@ -18,6 +20,11 @@
# 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; }