mirror of
https://github.com/reactos/wine.git
synced 2025-01-27 15:02:26 +00:00
wbemprox: Allow connecting to localhost.
This commit is contained in:
parent
12a2b849a6
commit
9961961901
@ -111,6 +111,8 @@ static void test_IWbemLocator(void)
|
||||
static const WCHAR path22W[] = {'r','o','o','t','\\','d','e','f','a','u','l','t',0};
|
||||
static const WCHAR path23W[] = {'r','o','o','t','\\','c','i','m','v','0',0};
|
||||
static const WCHAR path24W[] = {'r','o','o','t','\\','c','i','m','v','1',0};
|
||||
static const WCHAR path25W[] = {'\\','\\','l','o','c','a','l','h','o','s','t','\\','R','O','O','T',0};
|
||||
static const WCHAR path26W[] = {'\\','\\','L','O','C','A','L','H','O','S','T','\\','R','O','O','T',0};
|
||||
static const struct
|
||||
{
|
||||
const WCHAR *path;
|
||||
@ -144,7 +146,9 @@ static void test_IWbemLocator(void)
|
||||
{ path21W, S_OK },
|
||||
{ path22W, S_OK },
|
||||
{ path23W, WBEM_E_INVALID_NAMESPACE },
|
||||
{ path24W, WBEM_E_INVALID_NAMESPACE }
|
||||
{ path24W, WBEM_E_INVALID_NAMESPACE },
|
||||
{ path25W, S_OK },
|
||||
{ path26W, S_OK }
|
||||
};
|
||||
IWbemLocator *locator;
|
||||
IWbemServices *services;
|
||||
|
@ -89,10 +89,11 @@ static HRESULT WINAPI wbem_locator_QueryInterface(
|
||||
static BOOL is_local_machine( const WCHAR *server )
|
||||
{
|
||||
static const WCHAR dotW[] = {'.',0};
|
||||
static const WCHAR localhostW[] = {'l','o','c','a','l','h','o','s','t',0};
|
||||
WCHAR buffer[MAX_COMPUTERNAME_LENGTH + 1];
|
||||
DWORD len = sizeof(buffer) / sizeof(buffer[0]);
|
||||
|
||||
if (!server || !strcmpW( server, dotW )) return TRUE;
|
||||
if (!server || !strcmpW( server, dotW ) || !strcmpiW( server, localhostW )) return TRUE;
|
||||
if (GetComputerNameW( buffer, &len ) && !strcmpiW( server, buffer )) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user