diff --git a/reactos/lib/advapi32/advapi32.h b/reactos/lib/advapi32/advapi32.h index c5bf26cbc5b..52d039e2b6e 100644 --- a/reactos/lib/advapi32/advapi32.h +++ b/reactos/lib/advapi32/advapi32.h @@ -69,8 +69,21 @@ typedef struct _NTMARTA PVOID RewriteGetExplicitEntriesFromAcl; PVOID TreeResetNamedSecurityInfo; - PVOID GetInheritanceSource; - PVOID FreeIndexArray; + + DWORD (STDCALL *GetInheritanceSource)(LPWSTR pObjectName, + SE_OBJECT_TYPE ObjectType, + SECURITY_INFORMATION SecurityInfo, + BOOL Container, + GUID** pObjectClassGuids, + DWORD GuidCount, + PACL pAcl, + PFN_OBJECT_MGR_FUNCTS pfnArray, + PGENERIC_MAPPING pGenericMapping, + PINHERITED_FROMW pInheritArray); + + DWORD (STDCALL *FreeIndexArray)(PINHERITED_FROMW pInheritArray, + USHORT AceCnt, + PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL); } NTMARTA, *PNTMARTA; #define AccLookupAccountTrustee NtMartaStatic.LookupAccountTrustee diff --git a/reactos/lib/advapi32/sec/ac.c b/reactos/lib/advapi32/sec/ac.c index 8736d7c29d6..dc8b8be5ff7 100644 --- a/reactos/lib/advapi32/sec/ac.c +++ b/reactos/lib/advapi32/sec/ac.c @@ -435,7 +435,7 @@ GetAce ( /* - * @unimplemented + * @implemented */ DWORD STDCALL @@ -452,8 +452,25 @@ GetInheritanceSourceW ( PINHERITED_FROMW pInheritArray ) { - DPRINT1("%s() not implemented!\n", __FUNCTION__); - return ERROR_CALL_NOT_IMPLEMENTED; + DWORD ErrorCode; + + ErrorCode = CheckNtMartaPresent(); + if (ErrorCode == ERROR_SUCCESS) + { + /* call the MARTA provider */ + ErrorCode = AccGetInheritanceSource(pObjectName, + ObjectType, + SecurityInfo, + Container, + pObjectClassGuids, + GuidCount, + pAcl, + pfnArray, + pGenericMapping, + pInheritArray); + } + + return ErrorCode; } @@ -475,24 +492,38 @@ GetInheritanceSourceA ( PINHERITED_FROM pInheritArray ) { - DPRINT1("%s() not implemented!\n", __FUNCTION__); - return ERROR_CALL_NOT_IMPLEMENTED; + /* That's all this function does, at least up to w2k3... Even MS was too + lazy to implement it... */ + return ERROR_CALL_NOT_IMPLEMENTED; } /* - * @unimplemented + * @implemented */ DWORD STDCALL FreeInheritedFromArray ( - PINHERITED_FROM pInheritArray, + PINHERITED_FROMW pInheritArray, USHORT AceCnt, PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL ) { - DPRINT1("%s() not implemented!\n", __FUNCTION__); - return ERROR_CALL_NOT_IMPLEMENTED; + DWORD ErrorCode; + + /* pfnArray is not yet used */ + UNREFERENCED_PARAMETER(pfnArray); + + ErrorCode = CheckNtMartaPresent(); + if (ErrorCode == ERROR_SUCCESS) + { + /* call the MARTA provider */ + ErrorCode = AccFreeIndexArray(pInheritArray, + AceCnt, + NULL); + } + + return ErrorCode; } diff --git a/reactos/lib/advapi32/sec/misc.c b/reactos/lib/advapi32/sec/misc.c index 541b411d0ed..2095f89a89f 100644 --- a/reactos/lib/advapi32/sec/misc.c +++ b/reactos/lib/advapi32/sec/misc.c @@ -62,9 +62,9 @@ LoadAndInitializeNtMarta(VOID) #if 0 FindNtMartaProc(RewriteGetExplicitEntriesFromAcl); FindNtMartaProc(TreeResetNamedSecurityInfo); +#endif FindNtMartaProc(GetInheritanceSource); FindNtMartaProc(FreeIndexArray); -#endif return ERROR_SUCCESS; } diff --git a/reactos/lib/ntmarta/ntmarta.c b/reactos/lib/ntmarta/ntmarta.c index bbbcc23abcf..ef45520abe9 100644 --- a/reactos/lib/ntmarta/ntmarta.c +++ b/reactos/lib/ntmarta/ntmarta.c @@ -121,6 +121,43 @@ AccRewriteSetEntriesInAcl(ULONG cCountOfExplicitEntries, } +/********************************************************************** + * AccRewriteSetEntriesInAcl EXPORTED + * + * @unimplemented + */ +DWORD STDCALL +AccGetInheritanceSource(LPWSTR pObjectName, + SE_OBJECT_TYPE ObjectType, + SECURITY_INFORMATION SecurityInfo, + BOOL Container, + GUID** pObjectClassGuids, + DWORD GuidCount, + PACL pAcl, + PFN_OBJECT_MGR_FUNCTS pfnArray, + PGENERIC_MAPPING pGenericMapping, + PINHERITED_FROMW pInheritArray) +{ + UNIMPLEMENTED; + return ERROR_CALL_NOT_IMPLEMENTED; +} + + +/********************************************************************** + * AccFreeIndexArray EXPORTED + * + * @unimplemented + */ +DWORD STDCALL +AccFreeIndexArray(PINHERITED_FROMW pInheritArray, + USHORT AceCnt, + PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL) +{ + UNIMPLEMENTED; + return ERROR_CALL_NOT_IMPLEMENTED; +} + + BOOL STDCALL DllMain(IN HINSTANCE hinstDLL, IN DWORD dwReason, diff --git a/reactos/lib/ntmarta/ntmarta.def b/reactos/lib/ntmarta/ntmarta.def index bba5a5af1f3..c20f151ca6c 100644 --- a/reactos/lib/ntmarta/ntmarta.def +++ b/reactos/lib/ntmarta/ntmarta.def @@ -1,8 +1,8 @@ LIBRARY ntmarta.dll EXPORTS -;AccFreeIndexArray -;AccGetInheritanceSource +AccFreeIndexArray@12 +AccGetInheritanceSource@40 ;AccProvHandleGrantAccessRights; ;AccRewriteGetExplicitEntriesFromAcl AccRewriteGetHandleRights@32