Author: ekohl Date: Thu May 13 00:10:07 2010 New Revision: 47187
URL: http://svn.reactos.org/svn/reactos?rev=47187&view=rev Log: [MSGINA] Use WLX_PROFILE_V2_0 instead of WLX_PROFILE_V1_0 and create an environment string that is filled with a single environment variable. WIP for bug #4102.
Modified: trunk/reactos/dll/win32/msgina/msgina.c
Modified: trunk/reactos/dll/win32/msgina/msgina.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.c?r... ============================================================================== --- trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] Thu May 13 00:10:07 2010 @@ -415,8 +415,9 @@ IN PWSTR Password) { LPWSTR ProfilePath = NULL; + LPWSTR lpEnvironment = NULL; TOKEN_STATISTICS Stats; - PWLX_PROFILE_V1_0 pProfile = NULL; + PWLX_PROFILE_V2_0 pProfile = NULL; DWORD cbStats, cbSize; BOOL bResult;
@@ -449,14 +450,24 @@ }
/* Allocate memory for profile */ - pProfile = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WLX_PROFILE_V1_0)); + pProfile = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WLX_PROFILE_V2_0)); if (!pProfile) { WARN("HeapAlloc() failed\n"); goto cleanup; } - pProfile->dwType = WLX_PROFILE_TYPE_V1_0; + pProfile->dwType = WLX_PROFILE_TYPE_V2_0; pProfile->pszProfile = ProfilePath; + + lpEnvironment = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 32 * sizeof(WCHAR)); + if (!lpEnvironment) + { + WARN("HeapAlloc() failed\n"); + goto cleanup; + } + wcscpy(lpEnvironment, L"LOGONSERVER=\\Test"); + + pProfile->pszEnvironment = lpEnvironment;
if (!GetTokenInformation(pgContext->UserToken, TokenStatistics, @@ -467,6 +478,7 @@ WARN("Couldn't get Authentication id from user token!\n"); goto cleanup; } + *pgContext->pAuthenticationId = Stats.AuthenticationId; pgContext->pMprNotifyInfo->pszUserName = DuplicationString(UserName); pgContext->pMprNotifyInfo->pszDomain = DuplicationString(Domain); @@ -477,6 +489,10 @@ return TRUE;
cleanup: + if (pProfile) + { + HeapFree(GetProcessHeap(), 0, pProfile->pszEnvironment); + } HeapFree(GetProcessHeap(), 0, pProfile); HeapFree(GetProcessHeap(), 0, ProfilePath); return FALSE;