[freeside-commits] freeside/FS/FS UID.pm,1.28,1.29
Ivan,,,
ivan at wavetail.420.am
Thu Jul 13 17:32:14 PDT 2006
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv679/FS/FS
Modified Files:
UID.pm
Log Message:
should be able to freeside-setup without a username now
Index: UID.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/UID.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- UID.pm 13 Jul 2006 23:45:38 -0000 1.28
+++ UID.pm 14 Jul 2006 00:32:11 -0000 1.29
@@ -72,10 +72,15 @@
sub forksuidsetup {
$user = shift;
- croak "fatal: adminsuidsetup called without arguements" unless $user;
- $user =~ /^([\w\-\.]+)$/ or croak "fatal: illegal user $user";
- $user = $1;
+ if ( $FS::CurrentUser::upgrade_hack ) {
+ $user = '';
+ } else {
+ croak "fatal: adminsuidsetup called without arguements" unless $user;
+
+ $user =~ /^([\w\-\.]+)$/ or croak "fatal: illegal user $user";
+ $user = $1;
+ }
$ENV{'PATH'} ='/usr/local/bin:/usr/bin:/usr/ucb:/bin';
$ENV{'SHELL'} = '/bin/sh';
@@ -265,10 +270,10 @@
sub getsecrets {
my($setuser) = shift;
$user = $setuser if $setuser;
- die "No user!" unless $user;
my($conf) = new FS::Conf $conf_dir;
if ( $conf->exists('mapsecrets') ) {
+ die "No user!" unless $user;
my($line) = grep /^\s*($user|\*)\s/, $conf->config('mapsecrets');
die "User $user not found in mapsecrets!" unless $line;
$line =~ /^\s*($user|\*)\s+(.*)$/;
More information about the freeside-commits
mailing list