freeside/fs_selfservice/FS-SelfService SelfService.pm,1.16,1.17
ivan
ivan at pouncequick.420.am
Tue Mar 29 14:41:14 PST 2005
Update of /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService
In directory pouncequick:/tmp/cvs-serv16611/fs_selfservice/FS-SelfService
Modified Files:
SelfService.pm
Log Message:
better self-service debugging, don't point to install.html for suEXEC/setuid in self-service setup docs
Index: SelfService.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/SelfService.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- SelfService.pm 17 Oct 2004 14:01:47 -0000 1.16
+++ SelfService.pm 29 Mar 2005 22:41:10 -0000 1.17
@@ -1,7 +1,7 @@
package FS::SelfService;
use strict;
-use vars qw($VERSION @ISA @EXPORT_OK $socket %autoload $tag);
+use vars qw($VERSION @ISA @EXPORT_OK $dir $socket %autoload $tag);
use Exporter;
use Socket;
use FileHandle;
@@ -13,7 +13,8 @@
@ISA = qw( Exporter );
-$socket = "/usr/local/freeside/selfservice_socket";
+$dir = "/usr/local/freeside";
+$socket = "$dir/selfservice_socket";
$socket .= '.'.$tag if defined $tag && length($tag);
#maybe should ask ClientAPI for this list
@@ -57,6 +58,11 @@
my $freeside_uid = scalar(getpwnam('freeside'));
die "not running as the freeside user\n" if $> != $freeside_uid;
+-e $dir or die "FATAL: $dir doesn't exist!";
+-d $dir or die "FATAL: $dir isn't a directory!";
+-r $dir or die "FATAL: Can't read $dir as freeside user!";
+-x $dir or die "FATAL: $dir not searchable (executable) as freeside user!";
+
foreach my $autoload ( keys %autoload ) {
my $eval =
@@ -81,7 +87,7 @@
sub simple_packet {
my $packet = shift;
socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!";
- connect(SOCK, sockaddr_un($socket)) or die "connect: $!";
+ connect(SOCK, sockaddr_un($socket)) or die "connect to $socket: $!";
nstore_fd($packet, \*SOCK) or die "can't send packet: $!";
SOCK->flush;
More information about the freeside-commits
mailing list