Author: tfaber
Date: Sun Oct 12 16:19:45 2014
New Revision: 64699
URL:
http://svn.reactos.org/svn/reactos?rev=64699&view=rev
Log:
[SECUR32]
- Call SECUR32_initializeProviders from EnumerateSecurityPackagesW if necessary. Fixes a
couple secur32 tests, and an occasional crash in rpcrt4:rpc
Modified:
trunk/reactos/dll/win32/secur32/sspi.c
Modified: trunk/reactos/dll/win32/secur32/sspi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/secur32/sspi.c?r…
==============================================================================
--- trunk/reactos/dll/win32/secur32/sspi.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/secur32/sspi.c [iso-8859-1] Sun Oct 12 16:19:45 2014
@@ -37,6 +37,8 @@
DWORD numAllocated;
struct list table;
} SecureProviderTable;
+
+static void SECUR32_initializeProviders(void);
static CRITICAL_SECTION cs;
static CRITICAL_SECTION_DEBUG cs_debug =
@@ -122,6 +124,11 @@
SECURITY_STATUS ret = SEC_E_OK;
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;
@@ -718,6 +725,7 @@
'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 *ret = NULL;
BOOL matched = FALSE;
+#ifdef __REACTOS__
if (!packageTable)
SECUR32_initializeProviders();
+#endif
if (packageTable && packageName)
{