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/branches/2.7@12316 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
sjing 2012-04-24 01:59:41 +00:00
parent cc606e9a7e
commit 3e3f0e19b0

View File

@ -2476,6 +2476,9 @@ sub updatepasswd
if (xCAT::Utils->isMN()) { # if on Management Node
# xdsh <servicenodes> -v /opt/xcat/bin/db2sqlsetup -C -p
my $cmd="xdsh $snlist -v DATABASELOC=$::databaselocdir XCATDB2PW=$::adminpassword \/opt\/xcat\/bin\/db2sqlsetup -C -p";
# secure passwords in verbose mode
my $tmpv = $::VERBOSE;
$::VERBOSE = 0;
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
@ -2484,6 +2487,7 @@ sub updatepasswd
"$cmd2 failed. Could not change password on all the Service Nodes";
xCAT::MsgUtils->message("E", "$message");
}
$::VERBOSE = $tmpv;
} else { # on the SN
&shutdownxcatd;
&mkdb2user;