redact passwords and hashes from user.present updates

Fixes #32381
This commit is contained in:
Daniel Wallace 2016-04-13 17:42:51 -05:00
parent 46a4e8a310
commit 3db5e78d5d

View file

@ -516,7 +516,10 @@ def present(name,
if 'shadow.info' in __salt__:
for key in spost:
if lshad[key] != spost[key]:
ret['changes'][key] = spost[key]
if key == 'passwd':
ret['changes'][key] = 'XXX-REDACTED-XXX'
else:
ret['changes'][key] = spost[key]
if __grains__['kernel'] == 'OpenBSD':
if lcpre != lcpost:
ret['changes']['loginclass'] = lcpost