optimize logging

This commit is contained in:
Peter Hormanns 2017-11-23 17:13:52 +01:00
parent 02e4e1adbc
commit 9c7202f358

View File

@ -24,7 +24,7 @@ public class CommandShell {
int exitCode = 0; int exitCode = 0;
try { try {
String logCommand = command; String logCommand = command;
if (stdInput != null && !"newusers".equals(logCommand)) { if (stdInput != null) {
if (logCommand != null && (logCommand.startsWith("newusers") || logCommand.startsWith("chpasswd"))) { if (logCommand != null && (logCommand.startsWith("newusers") || logCommand.startsWith("chpasswd"))) {
// escape new password ! // escape new password !
final String[] strings = stdInput.split("\\:", 3); final String[] strings = stdInput.split("\\:", 3);