From 6f34d48d617c7d90947e26a79941ae34416b3eb4 Mon Sep 17 00:00:00 2001 From: sjing Date: Tue, 24 Apr 2012 01:40:45 +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/branches/2.7@12308 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 ca530c28e..80e20f2d7 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; } #