Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/combase.c | 24 +++++++++++++++++++++ dlls/combase/combase.spec | 2 +- dlls/ole32/compobj.c | 45 --------------------------------------- dlls/ole32/ole32.spec | 2 +- 4 files changed, 26 insertions(+), 47 deletions(-)
diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c index c67cf2fbce7..b87c6f19bac 100644 --- a/dlls/combase/combase.c +++ b/dlls/combase/combase.c @@ -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; +} diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index ed6767263d8..88d3adeec9e 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -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) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index b96edf99bf1..aeb7c4d29c2 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -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.@] * diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index c737b2e386e..54725e406ac 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -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)