fix bug 3850: "chtab key=fsp,username=HMC ..." doesn't work for Powerlinux

This commit is contained in:
zhaoertao 2013-10-24 22:57:58 -07:00
parent 6dd853fc65
commit 0059b61600

View File

@ -984,6 +984,18 @@ sub get_usr_passwd {
} else {
($ent) = $passwdtab->getNodeAttribs($key, qw(username password));
}
if (!$ent) {
if ($key eq "cec") {
$key = "fsp";
} elsif ($key eq "frame") {
$key = "bpa";
}
if ($user) {
($ent) = $passwdtab->getAttribs({key => $key, username => $user}, qw(password cryptmethod));
} else {
($ent) = $passwdtab->getNodeAttribs($key, qw(username password));
}
}
if (!$ent or !$ent->{password}) {
my $hash = $default_passwd_accounts{$key};
if (!$hash or ($user and !defined($hash->{$user}))) {