the fix for bug 3364300 - not display passwords in xcat commands or logs.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12307 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
sjing 2012-04-24 01:38:00 +00:00
parent d5a3ec70db
commit 1b3e43ba14

View File

@ -3615,6 +3615,9 @@ sub mknimimage
$pwcmd = qq~$::XCATROOT/bin/xcatchroot -i $spot_name "/usr/bin/echo root:$rootpw | /usr/bin/chpasswd -c" >/dev/null 2>&1~;
}
# secure passwd in verbose mode
my $tmpv = $::VERBOSE;
$::VERBOSE = 0;
my $out = xCAT::Utils->runcmd("$pwcmd", -1);
if ($::RUNCMD_RC != 0)
{
@ -3623,6 +3626,7 @@ sub mknimimage
push @{$rsp->{data}}, "$out\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
}
$::VERBOSE = $tmpv;
}
#