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 9a09552de5
commit 5de59481e1

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}))) {