Modifications to allow us to find the configuration folder even when executing on a drive rather than the install drive.
This commit is contained in:
parent
f6106fcd67
commit
14a164564b
@ -25,8 +25,12 @@
|
|||||||
//===[ Include files ]=====================================================
|
//===[ Include files ]=====================================================
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
#include <shlobj.h>
|
||||||
|
#include <shlwapi.h>
|
||||||
|
|
||||||
//===[ External data ]=====================================================
|
//===[ External data ]=====================================================
|
||||||
|
extern
|
||||||
|
char mechConfigFolderPartialPath[];
|
||||||
|
|
||||||
//===[ Manifest constants ]================================================
|
//===[ Manifest constants ]================================================
|
||||||
|
|
||||||
@ -57,13 +61,30 @@ BOOL APIENTRY DllMain(
|
|||||||
{
|
{
|
||||||
g_hModule = hModule;
|
g_hModule = hModule;
|
||||||
|
|
||||||
// Initialize the library
|
// Setup the path to the auth mechanisms config folder
|
||||||
if (Initialize() != 0)
|
if (SHGetFolderPath(NULL,
|
||||||
|
CSIDL_PROGRAM_FILES,
|
||||||
|
NULL,
|
||||||
|
0,
|
||||||
|
mechConfigFolder) == 0)
|
||||||
{
|
{
|
||||||
// Failed to initialize the library
|
PathAppend(mechConfigFolder, mechConfigFolderPartialPath);
|
||||||
OutputDebugString("CASAAUTH -DllMain- Library initialization failed\n");
|
|
||||||
|
// Initialize the library
|
||||||
|
if (Initialize() != 0)
|
||||||
|
{
|
||||||
|
// Failed to initialize the library
|
||||||
|
OutputDebugString("CASAAUTH -DllMain- Library initialization failed\n");
|
||||||
|
retStatus = FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Failed to obtain the Program Files path
|
||||||
|
OutputDebugString("CASAAUTH -DllMain- Failed to obtain the Program Files path\n");
|
||||||
retStatus = FALSE;
|
retStatus = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,8 @@ static
|
|||||||
HANDLE hNormalizedHostNameCacheMutex;
|
HANDLE hNormalizedHostNameCacheMutex;
|
||||||
|
|
||||||
// Authentication mechanism configuration file folder
|
// Authentication mechanism configuration file folder
|
||||||
char mechConfigFolder[] = "\\Program Files\\Novell\\Casa\\Etc\\Auth\\Mechanisms";
|
char mechConfigFolder[MAX_PATH];
|
||||||
|
char mechConfigFolderPartialPath[] = "Novell\\Casa\\Etc\\Auth\\Mechanisms";
|
||||||
|
|
||||||
// Synchronization mutex for the dll initialization
|
// Synchronization mutex for the dll initialization
|
||||||
static
|
static
|
||||||
|
Loading…
Reference in New Issue
Block a user