Skip to content

Commit

Permalink
Added /DomainPathsWithSite - Corrections
Browse files Browse the repository at this point in the history
- Addressed issue where no Active Directory site was assigned to a system.
  • Loading branch information
NoMoreFood committed Aug 1, 2022
1 parent 02f7da9 commit 9f71c40
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 2 deletions.
Binary file modified Build/Release/x64/repacls.exe
Binary file not shown.
Binary file modified Build/Release/x86/repacls.exe
Binary file not shown.
Binary file modified Build/Repacls.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions OperationDomainPaths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ OperationDomainPaths::OperationDomainPaths(std::queue<std::wstring>& oArgList, c
bool bMatchSite = false;
if (DsAddressToSiteNames(sDomainController.c_str(), 1, tAddressArray, &sSiteName) == NO_ERROR)
{
bMatchSite = std::regex_match(std::wstring(sSiteName[0]), std::wregex(sSiteArgs.at(0)));
if (sSiteName[0] != NULL) bMatchSite = std::regex_match(std::wstring(sSiteName[0]), std::wregex(sSiteArgs.at(0)));
NetApiBufferFree(sSiteName);
}

// cleanup
if (sSiteName != NULL) FreeAddrInfo(pAddressInfo);
FreeAddrInfo(pAddressInfo);

// skip this name is not match
if (!bMatchSite) continue;
Expand Down
Binary file modified Resource.rc
Binary file not shown.

0 comments on commit 9f71c40

Please sign in to comment.