[SECUR32]

- Call SECUR32_initializeProviders from EnumerateSecurityPackagesW if necessary. Fixes a couple secur32 tests, and an occasional crash in rpcrt4:rpc

svn path=/trunk/; revision=64699
This commit is contained in:
Thomas Faber 2014-10-12 16:19:45 +00:00
parent eebf53a4a1
commit 6774a3cf53

View file

@ -38,6 +38,8 @@ typedef struct _SecureProviderTable
struct list table;
} SecureProviderTable;
static void SECUR32_initializeProviders(void);
static CRITICAL_SECTION cs;
static CRITICAL_SECTION_DEBUG cs_debug =
{
@ -123,6 +125,11 @@ SECURITY_STATUS WINAPI EnumerateSecurityPackagesW(PULONG pcPackages,
TRACE("(%p, %p)\n", pcPackages, ppPackageInfo);
#ifdef __REACTOS__
if (!packageTable)
SECUR32_initializeProviders();
#endif
/* windows just crashes if pcPackages or ppPackageInfo is NULL, so will I */
*pcPackages = 0;
EnterCriticalSection(&cs);
@ -718,6 +725,7 @@ static const WCHAR securityProvidersW[] = {
'S','e','c','u','r','i','t','y','P','r','o','v','i','d','e','r','s',0
};
/* FIXME: we're missing SECUR32_freeProviders, so all of this gets leaked */
static void SECUR32_initializeProviders(void)
{
HKEY key;
@ -764,8 +772,10 @@ SecurePackage *SECUR32_findPackageW(PCWSTR packageName)
SecurePackage *ret = NULL;
BOOL matched = FALSE;
#ifdef __REACTOS__
if (!packageTable)
SECUR32_initializeProviders();
#endif
if (packageTable && packageName)
{