From 1b3e43ba14aae309f2c756bb7aba702e1ed0df6b Mon Sep 17 00:00:00 2001 From: sjing Date: Tue, 24 Apr 2012 01:38:00 +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@12307 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/aixinstall.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index c74d12832..457a34c72 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -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; } #