combase: Move CoSetProxyBlanket().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-08-06 09:13:06 +03:00 committed by Alexandre Julliard
parent a59a847c48
commit 28f325fd16
4 changed files with 26 additions and 47 deletions

View File

@ -479,3 +479,27 @@ HRESULT WINAPI CoQueryProxyBlanket(IUnknown *proxy, DWORD *authn_service,
if (FAILED(hr)) ERR("-- failed with %#x.\n", hr);
return hr;
}
/******************************************************************************
* CoSetProxyBlanket (combase.@)
*/
HRESULT WINAPI CoSetProxyBlanket(IUnknown *proxy, DWORD authn_service, DWORD authz_service,
OLECHAR *servername, DWORD authn_level, DWORD imp_level, void *auth_info, DWORD capabilities)
{
IClientSecurity *client_security;
HRESULT hr;
TRACE("%p, %u, %u, %p, %u, %u, %p, %#x.\n", proxy, authn_service, authz_service, servername,
authn_level, imp_level, auth_info, capabilities);
hr = IUnknown_QueryInterface(proxy, &IID_IClientSecurity, (void **)&client_security);
if (SUCCEEDED(hr))
{
hr = IClientSecurity_SetBlanket(client_security, proxy, authn_service, authz_service, servername, authn_level,
imp_level, auth_info, capabilities);
IClientSecurity_Release(client_security);
}
if (FAILED(hr)) ERR("-- failed with %#x.\n", hr);
return hr;
}

View File

@ -155,7 +155,7 @@
@ stdcall CoRevokeMallocSpy()
@ stub CoSetCancelObject
@ stub CoSetErrorInfo
@ stdcall CoSetProxyBlanket(ptr long long ptr long long ptr long) ole32.CoSetProxyBlanket
@ stdcall CoSetProxyBlanket(ptr long long ptr long long ptr long)
@ stdcall CoSuspendClassObjects() ole32.CoSuspendClassObjects
@ stdcall CoSwitchCallContext(ptr ptr) ole32.CoSwitchCallContext
@ stdcall CoTaskMemAlloc(long)

View File

@ -4192,51 +4192,6 @@ HRESULT WINAPI CoAllowSetForegroundWindow(IUnknown *pUnk, void *pvReserved)
return S_OK;
}
/***********************************************************************
* CoSetProxyBlanket [OLE32.@]
*
* Sets the security settings for a proxy.
*
* PARAMS
* pProxy [I] Pointer to the proxy object.
* AuthnSvc [I] The type of authentication service.
* AuthzSvc [I] The type of authorization service.
* pServerPrincName [I] The server prinicple name.
* AuthnLevel [I] The authentication level.
* ImpLevel [I] The impersonation level.
* pAuthInfo [I] Information specific to the authorization/authentication service.
* Capabilities [I] Flags affecting the security behaviour.
*
* RETURNS
* Success: S_OK.
* Failure: HRESULT code.
*
* SEE ALSO
* CoQueryProxyBlanket, CoCopyProxy.
*/
HRESULT WINAPI CoSetProxyBlanket(IUnknown *pProxy, DWORD AuthnSvc,
DWORD AuthzSvc, OLECHAR *pServerPrincName, DWORD AuthnLevel,
DWORD ImpLevel, void *pAuthInfo, DWORD Capabilities)
{
IClientSecurity *pCliSec;
HRESULT hr;
TRACE("%p\n", pProxy);
hr = IUnknown_QueryInterface(pProxy, &IID_IClientSecurity, (void **)&pCliSec);
if (SUCCEEDED(hr))
{
hr = IClientSecurity_SetBlanket(pCliSec, pProxy, AuthnSvc,
AuthzSvc, pServerPrincName,
AuthnLevel, ImpLevel, pAuthInfo,
Capabilities);
IClientSecurity_Release(pCliSec);
}
if (FAILED(hr)) ERR("-- failed with 0x%08x\n", hr);
return hr;
}
/***********************************************************************
* CoCopyProxy [OLE32.@]
*

View File

@ -79,7 +79,7 @@
@ stdcall CoRevokeClassObject(long)
@ stdcall CoRevokeInitializeSpy(int64)
@ stdcall CoRevokeMallocSpy() combase.CoRevokeMallocSpy
@ stdcall CoSetProxyBlanket(ptr long long ptr long long ptr long)
@ stdcall CoSetProxyBlanket(ptr long long ptr long long ptr long) combase.CoSetProxyBlanket
@ stdcall CoSetState(ptr)
@ stdcall CoSuspendClassObjects()
@ stdcall CoSwitchCallContext(ptr ptr)