From 041e84727923649c6b6d8583a3b0b80a9549442c Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Tue, 29 Jun 2021 14:19:41 -0400 Subject: [PATCH] Update comment --- xCAT-server/lib/perl/xCAT/xcatd.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/xcatd.pm b/xCAT-server/lib/perl/xCAT/xcatd.pm index d65fcdb2d..07beeda1e 100644 --- a/xCAT-server/lib/perl/xCAT/xcatd.pm +++ b/xCAT-server/lib/perl/xCAT/xcatd.pm @@ -271,6 +271,7 @@ sub validate { $saveArglist = "$first$restcommand"; } } + # Replace passwords with 'x' if ($arglist) { $logst .= redact_password($request->{command}->[0], $saveArglist); } if ($peername) { $logst .= " for " . $request->{username}->[0] } if ($peerhost) { $logst .= " from " . $peerhost } @@ -490,20 +491,20 @@ sub verifytoken { $class: Calling module name, for example: xCAT::xcatd - $request: Single line string of the command + arguments, for example: - [Request] rspconfig f6u13k18 'HMC_passwd=123' '*_passwd=abc,xyz' + $request: Single line string of the header + command + arguments, for example: + header [Request] rspconfig f6u13k18 'HMC_passwd=123' '*_passwd=abc,xyz' Type 2: Called from this module to log command to /var/log/messages and /var/log/xcat/cluster.log $class: Command name sting, for example: - respconfig + rspconfig $request: Single line string of arguments, for example: - f6u13k18 'HMC_passwd=123' '*_passwd=abc,xyz' + 'HMC_passwd=123' '*_passwd=abc,xyz' Returns string: Type 1: - [Request] rspconfig f6u13k18 'HMC_passwd=xxx' '*_passwd=xxxxxxx' + header [Request] rspconfig f6u13k18 'HMC_passwd=xxx' '*_passwd=xxxxxxx' Type 2: 'HMC_passwd=xxx' '*_passwd=xxxxxxx' @@ -518,6 +519,9 @@ sub redact_password { bmcdiscover => { flags => ["-p ", "-n "], }, + mkhwconn => { + flags => ["-P "], + }, rspconfig => { flags => ["admin_passwd=","HMC_passwd=","general_passwd=","*_passwd=","USERID="], },