projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cust_refund and cust_pay get custnums
[freeside.git]
/
FS
/
FS
/
UID.pm
diff --git
a/FS/FS/UID.pm
b/FS/FS/UID.pm
index
f5c4f61
..
3e71f09
100644
(file)
--- a/
FS/FS/UID.pm
+++ b/
FS/FS/UID.pm
@@
-15,7
+15,7
@@
use DBI;
use FS::Conf;
@ISA = qw(Exporter);
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'));
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
=head1 SYNOPSIS
use FS::UID qw(adminsuidsetup cgisuidsetup dbh datasrc getotaker
- checkeuid checkruid
swapuid
);
+ checkeuid checkruid);
adminsuidsetup $user;
adminsuidsetup $user;
@@
-84,8
+84,6
@@
sub adminsuidsetup {
'ChopBlanks' => 1,
} ) or die "DBI->connect error: $DBI::errstr\n";
'ChopBlanks' => 1,
} ) or die "DBI->connect error: $DBI::errstr\n";
- swapuid(); #go to non-privledged user if running setuid freeside
-
foreach ( keys %callback ) {
&{$callback{$_}};
}
foreach ( keys %callback ) {
&{$callback{$_}};
}
@@
-186,7
+184,8
@@
sub cgisetotaker {
} elsif ( $cgi && $cgi->isa('Apache') ) {
$user = lc ( $cgi->connection->user );
} else {
} 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;
}
}
$user;
}
@@
-211,16
+210,6
@@
sub checkruid {
( $< == $freeside_uid );
}
( $< == $freeside_uid );
}
-=item swapuid
-
-Swaps real and effective UIDs.
-
-=cut
-
-sub swapuid {
- ($<,$>) = ($>,$<) if $< != $>;
-}
-
=item getsecrets [ USER ]
Sets the user to USER, if supplied.
=item getsecrets [ USER ]
Sets the user to USER, if supplied.
@@
-260,7
+249,7
@@
coderef into the hash %FS::UID::callback :
=head1 VERSION
=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
=head1 BUGS