Merge branch 'master' of github.com:FreeRDP/FreeRDP
This commit is contained in:
commit
bf02b5b81f
@ -396,20 +396,10 @@ int credssp_server_authenticate(rdpCredssp* credssp)
|
||||
return 0;
|
||||
|
||||
#ifdef WITH_NATIVE_SSPI
|
||||
{
|
||||
HMODULE hSSPI;
|
||||
INIT_SECURITY_INTERFACE pInitSecurityInterface;
|
||||
|
||||
hSSPI = LoadLibrary(_T("secur32.dll"));
|
||||
|
||||
#ifdef UNICODE
|
||||
pInitSecurityInterface = (INIT_SECURITY_INTERFACE) GetProcAddress(hSSPI, "InitSecurityInterfaceW");
|
||||
#else
|
||||
pInitSecurityInterface = (INIT_SECURITY_INTERFACE) GetProcAddress(hSSPI, "InitSecurityInterfaceA");
|
||||
if (!credssp->SspiModule)
|
||||
credssp->SspiModule = _tcsdup(_T("secur32.dll"));
|
||||
#endif
|
||||
credssp->table = (*pInitSecurityInterface)();
|
||||
}
|
||||
#else
|
||||
|
||||
if (credssp->SspiModule)
|
||||
{
|
||||
HMODULE hSSPI;
|
||||
@ -431,6 +421,7 @@ int credssp_server_authenticate(rdpCredssp* credssp)
|
||||
|
||||
credssp->table = (*pInitSecurityInterface)();
|
||||
}
|
||||
#ifndef WITH_NATIVE_SSPI
|
||||
else
|
||||
{
|
||||
credssp->table = InitSecurityInterface();
|
||||
@ -1269,28 +1260,30 @@ rdpCredssp* credssp_new(freerdp* instance, rdpTls* tls, rdpSettings* settings)
|
||||
ZeroMemory(&credssp->pubKeyAuth, sizeof(SecBuffer));
|
||||
ZeroMemory(&credssp->authInfo, sizeof(SecBuffer));
|
||||
|
||||
status = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("Software\\FreeRDP\\Server"),
|
||||
0, KEY_READ | KEY_WOW64_64KEY, &hKey);
|
||||
|
||||
if (status == ERROR_SUCCESS)
|
||||
if (credssp->server)
|
||||
{
|
||||
status = RegQueryValueEx(hKey, _T("SspiModule"), NULL, &dwType, NULL, &dwSize);
|
||||
status = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("Software\\FreeRDP\\Server"),
|
||||
0, KEY_READ | KEY_WOW64_64KEY, &hKey);
|
||||
|
||||
if (status == ERROR_SUCCESS)
|
||||
{
|
||||
credssp->SspiModule = (LPTSTR) malloc(dwSize + sizeof(TCHAR));
|
||||
|
||||
status = RegQueryValueEx(hKey, _T("SspiModule"), NULL, &dwType,
|
||||
(BYTE*) credssp->SspiModule, &dwSize);
|
||||
status = RegQueryValueEx(hKey, _T("SspiModule"), NULL, &dwType, NULL, &dwSize);
|
||||
|
||||
if (status == ERROR_SUCCESS)
|
||||
{
|
||||
_tprintf(_T("Using SSPI Module: %s\n"), credssp->SspiModule);
|
||||
RegCloseKey(hKey);
|
||||
credssp->SspiModule = (LPTSTR) malloc(dwSize + sizeof(TCHAR));
|
||||
|
||||
status = RegQueryValueEx(hKey, _T("SspiModule"), NULL, &dwType,
|
||||
(BYTE*) credssp->SspiModule, &dwSize);
|
||||
|
||||
if (status == ERROR_SUCCESS)
|
||||
{
|
||||
_tprintf(_T("Using SSPI Module: %s\n"), credssp->SspiModule);
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return credssp;
|
||||
|
@ -35,13 +35,17 @@
|
||||
|
||||
void wf_peer_context_new(freerdp_peer* client, wfPeerContext* context)
|
||||
{
|
||||
#ifndef WITH_WIN8
|
||||
wfInfoSingleton = wf_info_init(wfInfoSingleton);
|
||||
wf_info_mirror_init(wfInfoSingleton, context);
|
||||
#endif
|
||||
}
|
||||
|
||||
void wf_peer_context_free(freerdp_peer* client, wfPeerContext* context)
|
||||
{
|
||||
#ifndef WITH_WIN8
|
||||
wf_info_subscriber_release(wfInfoSingleton, context);
|
||||
#endif
|
||||
}
|
||||
|
||||
static DWORD WINAPI wf_peer_mirror_monitor(LPVOID lpParam)
|
||||
@ -184,6 +188,7 @@ void wf_peer_init(freerdp_peer* client)
|
||||
client->ContextFree = (psPeerContextFree) wf_peer_context_free;
|
||||
freerdp_peer_context_new(client);
|
||||
|
||||
#ifndef WITH_WIN8
|
||||
if (!wf_info_get_thread_count(wfInfoSingleton))
|
||||
{
|
||||
_tprintf(_T("Trying to create a monitor thread...\n"));
|
||||
@ -193,6 +198,7 @@ void wf_peer_init(freerdp_peer* client)
|
||||
|
||||
wf_info_set_thread_count(wfInfoSingleton, wf_info_get_thread_count(wfInfoSingleton) + 1 );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
boolean wf_peer_post_connect(freerdp_peer* client)
|
||||
|
@ -91,8 +91,10 @@ static DWORD WINAPI wf_peer_main_loop(LPVOID lpParam)
|
||||
break;
|
||||
}
|
||||
|
||||
#ifndef WITH_WIN8
|
||||
if(client->activated)
|
||||
wf_peer_send_changes(client->update);
|
||||
#endif
|
||||
}
|
||||
|
||||
printf("Client %s disconnected.\n", client->local ? "(local)" : client->hostname);
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef WFREERDP_H
|
||||
#define WFREERDP_H
|
||||
|
||||
//#define WITH_WIN8 1
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/codec/rfx.h>
|
||||
#include "wf_info.h"
|
||||
|
Loading…
Reference in New Issue
Block a user