Skip to content

Commit

Permalink
Removed Early File Leaf Processing
Browse files Browse the repository at this point in the history
  • Loading branch information
NoMoreFood committed Mar 2, 2022
1 parent cd29114 commit a740958
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 12 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.
13 changes: 2 additions & 11 deletions ObjectFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,8 @@ void ObjectFile::GetChildObjects(ObjectEntry& oEntry)
oSubEntry.Name += oEntry.Name + ((oEntry.Depth == 0 && oEntry.Name.back() == '\\') ? L"" : L"\\")
+ std::wstring(oInfo->FileName, oInfo->FileNameLength / sizeof(WCHAR));

// if a leaf object, just process immediately and don't worry about putting it on the queue
if (!IsDirectory(oSubEntry.Attributes) || IsReparsePoint(oSubEntry.Attributes))
{
// do security analysis
oProcessor.AnalyzeSecurity(oSubEntry);
InputOutput::WriteToScreen();
}
else
{
oProcessor.GetQueue().Push(oSubEntry);
}
// add item to queue
oProcessor.GetQueue().Push(oSubEntry);

// this loop is complete, exit
if (oInfo->NextEntryOffset == 0) break;
Expand Down
2 changes: 1 addition & 1 deletion OperationHelp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ or end of your command as to not confuse them with ordered parameters.
Specifies the input format of any path specified by /Path and other ways
of providing paths. 'File' is the default if not specified.
/MaxDepths <NumberOfContainersDeep>
/MaxDepth <NumberOfContainersDeep>
Specifies how deep the scan should go within the path. This default is
to be fully recursive (infinite). Specifying 0 will only enumerate the
root node. This does not limit the propogation of inheritable permissions
Expand Down
Binary file modified Resource.rc
Binary file not shown.

0 comments on commit a740958

Please sign in to comment.