mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:03:00 +00:00
[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:
parent
eebf53a4a1
commit
6774a3cf53
1 changed files with 10 additions and 0 deletions
|
@ -38,6 +38,8 @@ typedef struct _SecureProviderTable
|
||||||
struct list table;
|
struct list table;
|
||||||
} SecureProviderTable;
|
} SecureProviderTable;
|
||||||
|
|
||||||
|
static void SECUR32_initializeProviders(void);
|
||||||
|
|
||||||
static CRITICAL_SECTION cs;
|
static CRITICAL_SECTION cs;
|
||||||
static CRITICAL_SECTION_DEBUG cs_debug =
|
static CRITICAL_SECTION_DEBUG cs_debug =
|
||||||
{
|
{
|
||||||
|
@ -123,6 +125,11 @@ SECURITY_STATUS WINAPI EnumerateSecurityPackagesW(PULONG pcPackages,
|
||||||
|
|
||||||
TRACE("(%p, %p)\n", pcPackages, ppPackageInfo);
|
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 */
|
/* windows just crashes if pcPackages or ppPackageInfo is NULL, so will I */
|
||||||
*pcPackages = 0;
|
*pcPackages = 0;
|
||||||
EnterCriticalSection(&cs);
|
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
|
'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)
|
static void SECUR32_initializeProviders(void)
|
||||||
{
|
{
|
||||||
HKEY key;
|
HKEY key;
|
||||||
|
@ -764,8 +772,10 @@ SecurePackage *SECUR32_findPackageW(PCWSTR packageName)
|
||||||
SecurePackage *ret = NULL;
|
SecurePackage *ret = NULL;
|
||||||
BOOL matched = FALSE;
|
BOOL matched = FALSE;
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
if (!packageTable)
|
if (!packageTable)
|
||||||
SECUR32_initializeProviders();
|
SECUR32_initializeProviders();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (packageTable && packageName)
|
if (packageTable && packageName)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue