mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-12 17:30:19 +00:00
fix bug 3510200: can use username other than USERID
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11956 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
@ -3911,7 +3911,16 @@ sub process_request {
|
||||
my $pass=$bladepass;
|
||||
my $ent;
|
||||
if (defined($mpatab)) {
|
||||
($ent)=$mpatab->getNodeSpecAttribs($mpa, {username=>"USERID"},qw(username password));
|
||||
#($ent)=$mpatab->getNodeSpecAttribs($mpa, {username=>"USERID"},qw(username password));
|
||||
my @user_array = $mpatab->getNodeAttribs($mpa, qw(username password));
|
||||
foreach my $entry (@user_array) {
|
||||
if ($entry->{username}) {
|
||||
if ($entry->{username} =~ /^USERID$/ or $entry->{username} !~ /^(HMC|general|admin)$/) {
|
||||
$ent = $entry;
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (defined($ent->{password})) { $pass = $ent->{password}; }
|
||||
if (defined($ent->{username})) { $user = $ent->{username}; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user