From b5a7923b9848471f31b88f0f96049fb6e1df390f Mon Sep 17 00:00:00 2001 From: Bryan Berns Date: Wed, 19 Dec 2018 11:27:54 -0500 Subject: [PATCH] Enhanced Account Missing Warning In /MoveDomain & /CopyDomain - Warnings in /MoveDomain and /CopyDomain will now indicate the part of the descriptor being processed as well as the target domain. --- InputOutput.h | 6 +++--- OperationCopyDomain.cpp | 4 ++-- OperationMoveDomain.cpp | 4 ++-- Version.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/InputOutput.h b/InputOutput.h index 0c4a40d..deda596 100644 --- a/InputOutput.h +++ b/InputOutput.h @@ -90,14 +90,14 @@ class InputOutput } } - static void AddWarning(const std::wstring & sLine) + static void AddWarning(const std::wstring & sLine, const std::wstring & sPart = L"") { if (Log()) { - OperationLog::LogFileItem(L"WARNING", GetFileName(), sLine); + OperationLog::LogFileItem(L"WARNING", GetFileName(), sLine + ((sPart.empty()) ? L"" : L" in " + sPart)); } - GetDetail() += L" WARNING: " + sLine + L"\n"; + GetDetail() += L" WARNING: " + sLine + ((sPart.empty()) ? L"" : L" in " + sPart) + L"\n"; } static void AddError(const std::wstring & sLine, const std::wstring & sExtended = L"") diff --git a/OperationCopyDomain.cpp b/OperationCopyDomain.cpp index 0b018da..e632d0b 100644 --- a/OperationCopyDomain.cpp +++ b/OperationCopyDomain.cpp @@ -106,8 +106,8 @@ bool OperationCopyDomain::ProcessAclAction(WCHAR * const sSdPart, ObjectEntry & // continue if no match was found if (tTargetAccountSid == nullptr) { - InputOutput::AddWarning(L"Could not find matching account in target domain for '" + - sSourceAccountName + L"'"); + InputOutput::AddWarning(L"Could not find matching account in target domain '" + + sTargetDomain + L"' for '" + sSourceAccountName + L"'", sSdPart); continue; } diff --git a/OperationMoveDomain.cpp b/OperationMoveDomain.cpp index 1a8a0cd..499afac 100644 --- a/OperationMoveDomain.cpp +++ b/OperationMoveDomain.cpp @@ -96,8 +96,8 @@ SidActionResult OperationMoveDomain::DetermineSid(WCHAR * const sSdPart, ObjectE // exit if no match was found if (tResultantSid == nullptr) { - InputOutput::AddWarning(L"Could not find matching account in target domain for '" + - sSourceAccountName + L"'"); + InputOutput::AddWarning(L"Could not find matching account in target domain '" + + sTargetDomain + L"' for '" + sSourceAccountName + L"'", sSdPart); return SidActionResult::Nothing; } diff --git a/Version.h b/Version.h index 409bc0f..7c4c5c7 100644 --- a/Version.h +++ b/Version.h @@ -1,4 +1,4 @@ #pragma once -#define VERSION_STRING "1.10.0.1" -#define VERSION_COMMA 1,10,0,1 +#define VERSION_STRING "1.10.0.2" +#define VERSION_COMMA 1,10,0,2