Skip to content

Commit

Permalink
Allow /ReplaceMap For Granular Targetting
Browse files Browse the repository at this point in the history
- Modified /ReplaceMap to take an optional "|DACL,SACL,OWNER" string that can be appended to the replacement file name.
  • Loading branch information
NoMoreFood committed Feb 20, 2021
1 parent 4351411 commit 166c151
Show file tree
Hide file tree
Showing 6 changed files with 5 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.
2 changes: 1 addition & 1 deletion OperationFindNullAcl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ bool OperationFindNullAcl::ProcessAclAction(const WCHAR * const sSdPart, ObjectE
InputOutput::AddInfo(L"Access control list is null", sSdPart);
}

// report the
// report the acl has been updated
return false;
}
5 changes: 4 additions & 1 deletion OperationReplaceMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ClassFactory<OperationReplaceMap> OperationReplaceMap::RegisteredFactory(GetComm
OperationReplaceMap::OperationReplaceMap(std::queue<std::wstring> & oArgList, const std::wstring & sCommand) : Operation(oArgList)
{
// exit if there are not enough arguments to parse
std::vector<std::wstring> sSubArgs = ProcessAndCheckArgs(1, oArgList, L"\\0");
std::vector<std::wstring> sSubArgs = ProcessAndCheckArgs(1, oArgList, L"\\|");

// open the file
std::wifstream fFile(sSubArgs.at(0).c_str());
Expand Down Expand Up @@ -65,6 +65,9 @@ OperationReplaceMap::OperationReplaceMap(std::queue<std::wstring> & oArgList, co
AppliesToSacl = true;
AppliesToGroup = true;
AppliesToOwner = true;

// target certain parts of the security descriptor
if (sSubArgs.size() > 1) ProcessGranularTargetting(sSubArgs.at(1));
}

SidActionResult OperationReplaceMap::DetermineSid(const WCHAR * const sSdPart, ObjectEntry & tObjectEntry, PSID const tCurrentSid, PSID & tResultantSid)
Expand Down
Binary file modified Resource.rc
Binary file not shown.

0 comments on commit 166c151

Please sign in to comment.