From 66b2bcfce0a4a986c155653d8619a897b1b65762 Mon Sep 17 00:00:00 2001 From: sjing Date: Tue, 24 Apr 2012 01:47:48 +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@12311 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/FSPUtils.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/perl-xCAT/xCAT/FSPUtils.pm b/perl-xCAT/xCAT/FSPUtils.pm index f84ba2c5d..5f27c39a6 100644 --- a/perl-xCAT/xCAT/FSPUtils.pm +++ b/perl-xCAT/xCAT/FSPUtils.pm @@ -172,9 +172,17 @@ sub fsp_api_action { #print "cmd: $cmd\n"; $SIG{CHLD} = 'DEFAULT'; + # secure passwords in verbose mode + my $tmpv = $::VERBOSE; + if($action =~ /^add_connection$/) + { + # password involved + $::VERBOSE = 0; + } $res = xCAT::Utils->runcmd($cmd, -1); #$res = "good"; $Rc = $::RUNCMD_RC; + $::VERBOSE = $tmpv; ################## # output the prompt