X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FUID.pm;h=3e71f09f1eae7673376a6adf89430128171d4ad8;hb=8c1f9804d9a02c0c054eededeb500c72a640249a;hp=f5c4f6139102a0295860793abffa6ae188eb0e0c;hpb=ece31063b782031e21ba1f57476afab555af5363;p=freeside.git diff --git a/FS/FS/UID.pm b/FS/FS/UID.pm index f5c4f6139..3e71f09f1 100644 --- a/FS/FS/UID.pm +++ b/FS/FS/UID.pm @@ -15,7 +15,7 @@ use DBI; use FS::Conf; @ISA = qw(Exporter); -@EXPORT_OK = qw(checkeuid checkruid swapuid cgisuidsetup +@EXPORT_OK = qw(checkeuid checkruid cgisuidsetup adminsuidsetup getotaker dbh datasrc getsecrets driver_name ); $freeside_uid = scalar(getpwnam('freeside')); @@ -31,7 +31,7 @@ FS::UID - Subroutines for database login and assorted other stuff =head1 SYNOPSIS use FS::UID qw(adminsuidsetup cgisuidsetup dbh datasrc getotaker - checkeuid checkruid swapuid); + checkeuid checkruid); adminsuidsetup $user; @@ -84,8 +84,6 @@ sub adminsuidsetup { 'ChopBlanks' => 1, } ) or die "DBI->connect error: $DBI::errstr\n"; - swapuid(); #go to non-privledged user if running setuid freeside - foreach ( keys %callback ) { &{$callback{$_}}; } @@ -186,7 +184,8 @@ sub cgisetotaker { } elsif ( $cgi && $cgi->isa('Apache') ) { $user = lc ( $cgi->connection->user ); } else { - die "fatal: Can't get REMOTE_USER! for cgi $cgi"; + die "fatal: Can't get REMOTE_USER! for cgi $cgi - you need to setup ". + "Apache user authentication as documented in htdocs/docs/config.html"; } $user; } @@ -211,16 +210,6 @@ sub checkruid { ( $< == $freeside_uid ); } -=item swapuid - -Swaps real and effective UIDs. - -=cut - -sub swapuid { - ($<,$>) = ($>,$<) if $< != $>; -} - =item getsecrets [ USER ] Sets the user to USER, if supplied. @@ -260,7 +249,7 @@ coderef into the hash %FS::UID::callback : =head1 VERSION -$Id: UID.pm,v 1.6 2001-04-23 09:00:06 ivan Exp $ +$Id: UID.pm,v 1.8 2001-08-21 09:34:13 ivan Exp $ =head1 BUGS