From f18bfe62e7fd89351a692947042e7444ad6267c8 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 4 Dec 2012 15:31:23 +0000 Subject: [PATCH] Recall the 'CLI' user/pass in order to facilitate case where cli and ipmi passwords mismatch (not recommended, but might as well implement it) git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14542 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/PasswordUtils.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/PasswordUtils.pm b/xCAT-server/lib/perl/xCAT/PasswordUtils.pm index ba26900c6..de2dadac9 100644 --- a/xCAT-server/lib/perl/xCAT/PasswordUtils.pm +++ b/xCAT-server/lib/perl/xCAT/PasswordUtils.pm @@ -53,8 +53,8 @@ sub getIPMIAuth { $authmap{$node}->{username}=$ipmiuser; $authmap{$node}->{password}=$ipmipass; if ($mphash and ref $mphash->{$node} and $mphash->{$node}->[0]->{mpa}) { #this appears to be a Flex or similar config, tend to use blade credentials - if ($bladeuser) { $authmap{$node}->{username}=$bladeuser; } - if ($bladepass) { $authmap{$node}->{password}=$bladepass; } + if ($bladeuser) { $authmap{$node}->{username}=$bladeuser; $authmap{$node}->{cliusername}=$bladeuser;} + if ($bladepass) { $authmap{$node}->{password}=$bladepass; $authmap{$node}->{clipassword}=$bladepass;} my $mpa = $mphash->{$node}->[0]->{mpa}; if (not $mpaauth{$mpa} and $mpatab) { my $mpaent = $mpatab->getNodeAttribs($mpa,[qw/username password/],prefetchcache=>1); #TODO: this might make more sense to do as one retrieval, oh well @@ -62,8 +62,8 @@ sub getIPMIAuth { if (ref $mpaent and $mpaent->{password}) { $mpaauth{$mpa}->{password} = $mpaent->{password} } $mpaauth{$mpa}->{checked} = 1; #remember we already looked this up, to save lookup time even if search was fruitless } - if ($mpaauth{$mpa}->{username}) { $authmap{$node}->{username} = $mpaauth{$mpa}->{username} } - if ($mpaauth{$mpa}->{password}) { $authmap{$node}->{password} = $mpaauth{$mpa}->{password} } + if ($mpaauth{$mpa}->{username}) { $authmap{$node}->{username} = $mpaauth{$mpa}->{username}; $authmap{$node}->{cliusername}=$mpaauth{$mpa}->{username}; } + if ($mpaauth{$mpa}->{password}) { $authmap{$node}->{password} = $mpaauth{$mpa}->{password} ; $authmap{$node}->{clipassword}=$mpaauth{$mpa}->{password} } } unless (ref $ipmihash and ref $ipmihash->{$node}) { next;