-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
OperationResetChildren.cpp
31 lines (25 loc) · 1.09 KB
/
OperationResetChildren.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "OperationResetChildren.h"
#include "InputOutput.h"
#include "Helpers.h"
ClassFactory<OperationResetChildren> OperationResetChildren::RegisteredFactory(GetCommand());
OperationResetChildren::OperationResetChildren(std::queue<std::wstring> & oArgList, const std::wstring & sCommand) : Operation(oArgList)
{
// setup null ace for allowing inheritance
InitializeAcl(&tAclNull, sizeof(tAclNull), ACL_REVISION);
// flag this as being an ace-level action
AppliesToDacl = true;
AppliesToSacl = true;
AppliesToChildrenOnly = true;
ExclusiveOperation = true;
SpecialCommitFlags = UNPROTECTED_SACL_SECURITY_INFORMATION | UNPROTECTED_DACL_SECURITY_INFORMATION;
}
bool OperationResetChildren::ProcessAclAction(const WCHAR * const sSdPart, ObjectEntry & tObjectEntry, PACL & tCurrentAcl, bool & bAclReplacement)
{
// cleanup existing if it had been reallocated
if (bAclReplacement) LocalFree(tCurrentAcl);
bAclReplacement = false;
// setting the null acl will overwrite all explicit entires
tCurrentAcl = &tAclNull;
// nothing to do -- the special commit flags will take care of it
return true;
}