summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2001-08-21 09:34:13 +0000
committerivan <ivan>2001-08-21 09:34:13 +0000
commit6ef34dda51afba96d8dc6c4dd72427c3d4003945 (patch)
tree386c2a2659643f81bdcd08b4701ebee364282d7b /FS
parentbfb8e18f5e245c3043ea44fad8fe3119ee73b37a (diff)
no more &swapuid
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Record.pm6
-rw-r--r--FS/FS/UID.pm18
-rwxr-xr-xFS/bin/freeside-bill4
3 files changed, 7 insertions, 21 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 8dbd4aff3..2c745b413 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -8,7 +8,7 @@ use Carp qw(carp cluck croak confess);
use File::CounterFile;
use Locale::Country;
use DBIx::DBSchema;
-use FS::UID qw(dbh checkruid swapuid getotaker datasrc driver_name);
+use FS::UID qw(dbh checkruid getotaker datasrc driver_name);
@ISA = qw(Exporter);
@EXPORT_OK = qw(dbh fields hfields qsearch qsearchs dbdef);
@@ -566,7 +566,6 @@ sub unique {
#warn "table $table is tainted" if is_tainted($table);
#warn "field $field is tainted" if is_tainted($field);
- &swapuid;
my($counter) = new File::CounterFile "$table.$field",0;
# hack for web demo
# getotaker() =~ /^([\w\-]{1,16})$/ or die "Illegal CGI REMOTE_USER!";
@@ -577,7 +576,6 @@ sub unique {
my($index)=$counter->inc;
$index=$counter->inc
while qsearchs($table,{$field=>$index}); #just in case
- &swapuid;
$index =~ /^(\d*)$/;
$index=$1;
@@ -971,7 +969,7 @@ sub DESTROY { return; }
=head1 VERSION
-$Id: Record.pm,v 1.24 2001-08-19 00:48:49 ivan Exp $
+$Id: Record.pm,v 1.25 2001-08-21 09:34:13 ivan Exp $
=head1 BUGS
diff --git a/FS/FS/UID.pm b/FS/FS/UID.pm
index 7ebe592c3..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{$_}};
}
@@ -212,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.
@@ -261,7 +249,7 @@ coderef into the hash %FS::UID::callback :
=head1 VERSION
-$Id: UID.pm,v 1.7 2001-06-21 16:27:52 ivan Exp $
+$Id: UID.pm,v 1.8 2001-08-21 09:34:13 ivan Exp $
=head1 BUGS
diff --git a/FS/bin/freeside-bill b/FS/bin/freeside-bill
index 42991c4f8..3462fa149 100755
--- a/FS/bin/freeside-bill
+++ b/FS/bin/freeside-bill
@@ -4,7 +4,7 @@ use strict;
use Fcntl qw(:flock);
use Date::Parse;
use Getopt::Std;
-use FS::UID qw(adminsuidsetup swapuid);
+use FS::UID qw(adminsuidsetup);
use FS::Record qw(qsearch qsearchs);
use FS::cust_main;
@@ -114,7 +114,7 @@ customers. Otherwise, bills all customers.
=head1 VERSION
-$Id: freeside-bill,v 1.6 2000-06-24 00:28:30 ivan Exp $
+$Id: freeside-bill,v 1.7 2001-08-21 09:34:13 ivan Exp $
=head1 BUGS