Merge pull request #27793 from alprs/fix-salt_ssh_b64_log

update code that changes log level of salt-ssh shim command
This commit is contained in:
Colton Myers 2015-10-08 13:20:12 -06:00
commit dd9dba8f59
2 changed files with 2 additions and 2 deletions

View file

@ -292,7 +292,7 @@ class Shell(object):
logmsg = 'Executing command: {0}'.format(cmd)
if self.passwd:
logmsg = logmsg.replace(self.passwd, ('*' * 6))
if 'decode("base64")' in logmsg:
if 'decode("base64")' in logmsg or 'base64.b64decode(' in logmsg:
log.debug('Executed SHIM command. Command logged to TRACE')
log.trace(logmsg)
else:

View file

@ -219,7 +219,7 @@ class Terminal(object):
'{2}'.format(self.pid, self.child_fd, self.child_fde)
)
terminal_command = ' '.join(self.args)
if 'decode("base64")' in terminal_command:
if 'decode("base64")' in terminal_command or 'base64.b64decode(' in terminal_command:
log.debug('VT: Salt-SSH SHIM Terminal Command executed. Logged to TRACE')
log.trace('Terminal Command: {0}'.format(terminal_command))
else: