X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FUID.pm;h=0b10612c53e852504253b11828e8b8bc5db7af72;hp=890e2988a1618bc11d23243fd47a30014a065a99;hb=5786c8244a188823b01b87e2d7e9fd6bc72644b3;hpb=bcb172a6ea2b9f3e645eed81896f960151267bf5 diff --git a/FS/FS/UID.pm b/FS/FS/UID.pm index 890e2988a..0b10612c5 100644 --- a/FS/FS/UID.pm +++ b/FS/FS/UID.pm @@ -73,6 +73,9 @@ sub forksuidsetup { $user = shift; 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'; $ENV{'IFS'} = " \t\n"; @@ -89,6 +92,7 @@ sub forksuidsetup { foreach ( keys %callback ) { &{$callback{$_}}; + # breaks multi-database installs # delete $callback{$_}; #run once } $dbh; @@ -188,7 +192,7 @@ sub cgisetotaker { $user = lc ( $cgi->connection->user ); } else { die "fatal: Can't get REMOTE_USER! for cgi $cgi - you need to setup ". - "Apache user authentication as documented in httemplate/docs/config.html"; + "Apache user authentication as documented in httemplate/docs/install.html"; } $user; } @@ -227,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; @@ -252,7 +256,7 @@ coderef into the hash %FS::UID::callback : =head1 VERSION -$Id: UID.pm,v 1.11 2001-11-06 17:58:08 ivan Exp $ +$Id: UID.pm,v 1.18 2002-07-03 11:23:25 ivan Exp $ =head1 BUGS