Skip to content

Commit

Permalink
Enhanced Account Missing Warning In /MoveDomain & /CopyDomain
Browse files Browse the repository at this point in the history
- Warnings in /MoveDomain and /CopyDomain will now indicate the part of the descriptor being processed as well as the target domain.
  • Loading branch information
NoMoreFood committed Dec 19, 2018
1 parent 36d72ab commit b5a7923
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions InputOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"")
Expand Down
4 changes: 2 additions & 2 deletions OperationCopyDomain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions OperationMoveDomain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions Version.h
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b5a7923

Please sign in to comment.