Permalink
Browse files

removed AdminUser configuration directive

  • Loading branch information...
1 parent 9db6fde commit 40a5f3e73619d7294e84779079cce89563f887b2 @racke racke committed Mar 11, 2010
Showing with 2 additions and 42 deletions.
  1. +1 −0 UPGRADE
  2. +0 −1 lib/Vend/Config.pm
  3. +0 −31 lib/Vend/UserDB.pm
  4. +1 −10 lib/Vend/Util.pm
View
@@ -86,6 +86,7 @@ KNOWN ISSUES UPGRADING FROM 5.6
Perl 5.8.5 or newer is now required.
+AdminUser configuration directive has been removed.
PROBLEM WORKAROUND FOR POSTGRESQL 8.3 USERS
View
@@ -498,7 +498,6 @@ sub global_directives {
['UserTag', 'tag', ''],
['CodeDef', 'mapped_code', ''],
['HotDBI', 'boolean', ''],
- ['AdminUser', undef, ''],
['HammerLock', 'time', 30],
['DataTrace', 'integer', 0],
['ShowTimes', 'yesno', 0],
View
@@ -1381,37 +1381,6 @@ sub login {
die $stock_error, "\n";
}
- # Allow entry to global AdminUser without checking access database
- ADMINUSER: {
- if ($Global::AdminUser) {
- my $pwinfo = $Global::AdminUser;
- $pwinfo =~ s/^\s+//; $pwinfo =~ s/\s+$//;
- my ($adminuser, $adminpass) = split /[\s:]+/, $pwinfo;
- last ADMINUSER unless $adminuser eq $self->{USERNAME};
- unless ($adminpass) {
- $self->log_either(errmsg("Refusing to use AdminUser variable with user '%s' and empty password", $adminuser));
- last ADMINUSER;
- }
- my $test;
- if($Global::Variable->{MV_NO_CRYPT}) {
- $test = $self->{PASSWORD};
- }
- else {
- my $sub = $self->{ENCSUB};
- $self->{ENCSUB} = $enc_subs{default};
- $test = $self->do_crypt($self->{PASSWORD}, $adminpass);
- $self->{ENCSUB} = $sub;
- }
- if ($test eq $adminpass) {
- $user_data = {};
- $Vend::admin = $Vend::superuser = 1;
- $self->log_either( errmsg("Successful superuser login by AdminUser '%s'", $adminuser));
- } else {
- $self->log_either(errmsg("Password given with user name '%s' didn't match AdminUser password", $adminuser));
- }
- }
- }
-
my $udb = $self->{DB};
my $foreign = $self->{OPTIONS}{indirect_login};
View
@@ -1426,16 +1426,7 @@ sub check_authorization {
);
my $cmp_pw;
my $use_crypt = 1;
- if(!defined $Vend::Cfg) {
- $pwinfo = $Global::AdminUser;
- $pwinfo =~ s/^\s+//;
- $pwinfo =~ s/\s+$//;
- my (%compare) = split /[\s:]+/, $pwinfo;
- return undef unless $compare{$user};
- $cmp_pw = $compare{$user};
- undef $use_crypt if $Global::Variable->{MV_NO_CRYPT};
- }
- elsif( $user eq $Vend::Cfg->{RemoteUser} and
+ if( $user eq $Vend::Cfg->{RemoteUser} and
$Vend::Cfg->{Password} )
{
$cmp_pw = $Vend::Cfg->{Password};

0 comments on commit 40a5f3e

Please sign in to comment.