[freeside-commits] freeside/fs_selfservice/FS-SelfService SelfService.pm, 1.36, 1.37
Ivan,,,
ivan at wavetail.420.am
Fri Oct 24 12:13:55 PDT 2008
Update of /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService
In directory wavetail.420.am:/tmp/cvs-serv8127
Modified Files:
SelfService.pm
Log Message:
rlm_perl hook for prepaid voip radius, RT#4100
Index: SelfService.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/SelfService.pm,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- SelfService.pm 23 Oct 2008 05:20:40 -0000 1.36
+++ SelfService.pm 24 Oct 2008 19:13:52 -0000 1.37
@@ -1,7 +1,8 @@
package FS::SelfService;
use strict;
-use vars qw($VERSION @ISA @EXPORT_OK $DEBUG $dir $socket %autoload $tag);
+use vars qw( $VERSION @ISA @EXPORT_OK $DEBUG
+ $skip_uid_check $dir $socket %autoload $tag );
use Exporter;
use Socket;
use FileHandle;
@@ -15,6 +16,10 @@
$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);
@@ -58,6 +63,9 @@
'agent_info' => 'Agent/agent_info',
'agent_list_customers' => 'Agent/agent_list_customers',
'mason_comp' => 'MasonComponent/mason_comp',
+ 'call_time' => 'PrepaidPhone/call_time',
+ 'call_time_nanpa' => 'PrepaidPhone/call_time_nanpa'
+ 'phonenum_balance' => 'PrepaidPhone/phonenum_balance'
);
@EXPORT_OK = ( keys(%autoload), qw( regionselector expselect popselector domainselector didselector) );
@@ -69,7 +77,8 @@
$ENV{'BASH_ENV'} = '';
my $freeside_uid = scalar(getpwnam('freeside'));
-die "not running as the freeside user\n" if $> != $freeside_uid;
+die "not running as the freeside user\n"
+ if $> != $freeside_uid && ! $skip_uid_check;
-e $dir or die "FATAL: $dir doesn't exist!";
-d $dir or die "FATAL: $dir isn't a directory!";
More information about the freeside-commits
mailing list