Add check for ACL editor MapGeneric types
@@ -447,6 +447,10 @@ HRESULT STDMETHODCALLTYPE PhSecurityInformation_MapGeneric(
_In_ PUCHAR AceFlags,
_Inout_ PACCESS_MASK Mask
)
+{
+ PhSecurityInformation* this = (PhSecurityInformation*)This;
+
+ if (PhEqualString2(this->ObjectType, L"FileObject", TRUE))
{
static GENERIC_MAPPING genericMappings =
{
@@ -457,6 +461,27 @@ HRESULT STDMETHODCALLTYPE PhSecurityInformation_MapGeneric(
};
RtlMapGenericMask(Mask, &genericMappings);
+ }
+
+ // TODO we're supposed to lookup the GenericMapping for the object type. (dmex)
+
+ //POBJECT_TYPES_INFORMATION objectTypes;
+ //POBJECT_TYPE_INFORMATION objectType;
+
+ //if (NT_SUCCESS(PhEnumObjectTypes(&objectTypes)))
+ //{
+ // objectType = PH_FIRST_OBJECT_TYPE(objectTypes);
+ //
+ // for (ULONG i = 0; i < objectTypes->NumberOfTypes; i++)
+ // {
+ // RtlMapGenericMask(Mask, &objectType->GenericMapping);
+ // }
+ //
+ // PhFree(objectTypes);
+ //}
+
+ // TODO
+ // NtQuerySystemInformation(SystemObjectInformation);
return S_OK;
}
