X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FUID.pm;h=ebf9b96e5271bca13cee2b6b234085e8512c5a73;hb=e34a817fc92eda8b6f9596b3a925c40bfb7e3887;hp=78910195a7873c41d4ae0b086283cf468e30f67d;hpb=cefb9727ed4cdfacf3b967485d58b25fbea98c6b;p=freeside.git diff --git a/FS/FS/UID.pm b/FS/FS/UID.pm index 78910195a..ebf9b96e5 100644 --- a/FS/FS/UID.pm +++ b/FS/FS/UID.pm @@ -73,7 +73,7 @@ sub forksuidsetup { $user = shift; croak "fatal: adminsuidsetup called without arguements" unless $user; - $user =~ /^([\w\-\.]+)/ or croak "fatal: illegal user $user"; + $user =~ /^([\w\-\.]+)$/ or croak "fatal: illegal user $user"; $user = $1; $ENV{'PATH'} ='/usr/local/bin:/usr/bin:/usr/ucb:/bin'; @@ -87,11 +87,12 @@ sub forksuidsetup { getsecrets; $dbh = DBI->connect($datasrc,$db_user,$db_pass, { 'AutoCommit' => 0, - 'ChopBlanks' => 1, + #'ChopBlanks' => 1, } ) or die "DBI->connect error: $DBI::errstr\n"; foreach ( keys %callback ) { &{$callback{$_}}; + # breaks multi-database installs # delete $callback{$_}; #run once } $dbh; @@ -230,7 +231,7 @@ sub getsecrets { die "No user!" unless $user; my($conf) = new FS::Conf $conf_dir; my($line) = grep /^\s*$user\s/, $conf->config('mapsecrets'); - die "User not found in mapsecrets!" unless $line; + die "User $user not found in mapsecrets!" unless $line; $line =~ /^\s*$user\s+(.*)$/; $secrets = $1; die "Illegal mapsecrets line for user?!" unless $secrets; @@ -255,7 +256,7 @@ coderef into the hash %FS::UID::callback : =head1 VERSION -$Id: UID.pm,v 1.13 2002-02-23 02:14:25 jeff Exp $ +$Id: UID.pm,v 1.21 2002-09-27 12:14:12 ivan Exp $ =head1 BUGS