From 846cb5662e6ed6f89dd8b082b2649307b1eb30b7 Mon Sep 17 00:00:00 2001 From: sjing Date: Tue, 24 Apr 2012 01:58:20 +0000 Subject: [PATCH] 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@12315 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/db2sqlsetup | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-client/bin/db2sqlsetup b/xCAT-client/bin/db2sqlsetup index d47ff16f8..e3c0e6da7 100755 --- a/xCAT-client/bin/db2sqlsetup +++ b/xCAT-client/bin/db2sqlsetup @@ -2476,6 +2476,9 @@ sub updatepasswd if (xCAT::Utils->isMN()) { # if on Management Node # xdsh -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;