Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/Makefile.in | 2 +- dlls/combase/combase.c | 14 ++++++++++++++ dlls/combase/combase.spec | 2 +- dlls/ole32/compobj.c | 26 -------------------------- dlls/ole32/ole32.spec | 2 +- 5 files changed, 17 insertions(+), 29 deletions(-)
diff --git a/dlls/combase/Makefile.in b/dlls/combase/Makefile.in index 87bb149b594..71537f699b1 100644 --- a/dlls/combase/Makefile.in +++ b/dlls/combase/Makefile.in @@ -1,6 +1,6 @@ MODULE = combase.dll IMPORTLIB = combase -IMPORTS = advapi32 ole32 user32 gdi32 uuid +IMPORTS = advapi32 ole32 user32 gdi32 uuid rpcrt4 DELAYIMPORTS = oleaut32
EXTRADLLFLAGS = -mno-cygwin diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c index bf1228a1f24..9bf2252fb85 100644 --- a/dlls/combase/combase.c +++ b/dlls/combase/combase.c @@ -440,3 +440,17 @@ HRESULT WINAPI CoFileTimeNow(FILETIME *filetime) GetSystemTimeAsFileTime(filetime); return S_OK; } + +/****************************************************************************** + * CoCreateGuid (combase.@) + */ +HRESULT WINAPI CoCreateGuid(GUID *guid) +{ + RPC_STATUS status; + + if (!guid) return E_INVALIDARG; + + status = UuidCreate(guid); + if (status == RPC_S_OK || status == RPC_S_UUID_LOCAL_ONLY) return S_OK; + return HRESULT_FROM_WIN32(status); +} diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index 9940229c46f..ddfe5c5ca2e 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -78,7 +78,7 @@ @ stdcall CoCopyProxy(ptr ptr) ole32.CoCopyProxy @ stub CoCreateErrorInfo @ stdcall CoCreateFreeThreadedMarshaler(ptr ptr) ole32.CoCreateFreeThreadedMarshaler -@ stdcall CoCreateGuid(ptr) ole32.CoCreateGuid +@ stdcall CoCreateGuid(ptr) @ stdcall CoCreateInstance(ptr ptr long ptr ptr) ole32.CoCreateInstance @ stdcall CoCreateInstanceEx(ptr ptr long ptr long ptr) ole32.CoCreateInstanceEx @ stub CoCreateInstanceFromApp diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 29c8ca6e13a..f96d69c198c 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -2186,32 +2186,6 @@ HRESULT WINAPI CoDisconnectObject( LPUNKNOWN lpUnk, DWORD reserved ) return S_OK; }
-/****************************************************************************** - * CoCreateGuid [OLE32.@] - * - * Simply forwards to UuidCreate in RPCRT4. - * - * PARAMS - * pguid [O] Points to the GUID to initialize. - * - * RETURNS - * Success: S_OK. - * Failure: HRESULT code. - * - * SEE ALSO - * UuidCreate - */ -HRESULT WINAPI CoCreateGuid(GUID *pguid) -{ - DWORD status; - - if(!pguid) return E_INVALIDARG; - - status = UuidCreate(pguid); - if (status == RPC_S_OK || status == RPC_S_UUID_LOCAL_ONLY) return S_OK; - return HRESULT_FROM_WIN32( status ); -} - static inline BOOL is_valid_hex(WCHAR c) { if (!(((c >= '0') && (c <= '9')) || diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index 87c950cf438..0713a989eed 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -11,7 +11,7 @@ @ stdcall CoBuildVersion() @ stdcall CoCopyProxy(ptr ptr) @ stdcall CoCreateFreeThreadedMarshaler(ptr ptr) -@ stdcall CoCreateGuid(ptr) +@ stdcall CoCreateGuid(ptr) combase.CoCreateGuid @ stdcall CoCreateInstance(ptr ptr long ptr ptr) @ stdcall CoCreateInstanceEx(ptr ptr long ptr long ptr) @ stdcall CoDecrementMTAUsage(ptr)
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/combase.c | 25 ++++++++++++++++++++++ dlls/combase/combase.spec | 2 +- dlls/ole32/compobj.c | 45 --------------------------------------- dlls/ole32/ole32.spec | 2 +- 4 files changed, 27 insertions(+), 47 deletions(-)
diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c index 9bf2252fb85..c67cf2fbce7 100644 --- a/dlls/combase/combase.c +++ b/dlls/combase/combase.c @@ -454,3 +454,28 @@ HRESULT WINAPI CoCreateGuid(GUID *guid) if (status == RPC_S_OK || status == RPC_S_UUID_LOCAL_ONLY) return S_OK; return HRESULT_FROM_WIN32(status); } + +/****************************************************************************** + * CoQueryProxyBlanket (combase.@) + */ +HRESULT WINAPI CoQueryProxyBlanket(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, %p, %p, %p, %p, %p, %p, %p.\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_QueryBlanket(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 ddfe5c5ca2e..ed6767263d8 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -135,7 +135,7 @@ @ stub CoPushServiceDomain @ stub CoQueryAuthenticationServices @ stdcall CoQueryClientBlanket(ptr ptr ptr ptr ptr ptr ptr) ole32.CoQueryClientBlanket -@ stdcall CoQueryProxyBlanket(ptr ptr ptr ptr ptr ptr ptr ptr) ole32.CoQueryProxyBlanket +@ stdcall CoQueryProxyBlanket(ptr ptr ptr ptr ptr ptr ptr ptr) @ stub CoReactivateObject @ stub CoRegisterActivationFilter @ stdcall CoRegisterClassObject(ptr ptr long long ptr) ole32.CoRegisterClassObject diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index f96d69c198c..b96edf99bf1 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -4191,51 +4191,6 @@ HRESULT WINAPI CoAllowSetForegroundWindow(IUnknown *pUnk, void *pvReserved) FIXME("(%p, %p): stub\n", pUnk, pvReserved); return S_OK; } - -/*********************************************************************** - * CoQueryProxyBlanket [OLE32.@] - * - * Retrieves the security settings being used by a proxy. - * - * PARAMS - * pProxy [I] Pointer to the proxy object. - * pAuthnSvc [O] The type of authentication service. - * pAuthzSvc [O] The type of authorization service. - * ppServerPrincName [O] Optional. The server prinicple name. - * pAuthnLevel [O] The authentication level. - * pImpLevel [O] The impersonation level. - * ppAuthInfo [O] Information specific to the authorization/authentication service. - * pCapabilities [O] Flags affecting the security behaviour. - * - * RETURNS - * Success: S_OK. - * Failure: HRESULT code. - * - * SEE ALSO - * CoCopyProxy, CoSetProxyBlanket. - */ -HRESULT WINAPI CoQueryProxyBlanket(IUnknown *pProxy, DWORD *pAuthnSvc, - DWORD *pAuthzSvc, OLECHAR **ppServerPrincName, DWORD *pAuthnLevel, - DWORD *pImpLevel, void **ppAuthInfo, DWORD *pCapabilities) -{ - IClientSecurity *pCliSec; - HRESULT hr; - - TRACE("%p\n", pProxy); - - hr = IUnknown_QueryInterface(pProxy, &IID_IClientSecurity, (void **)&pCliSec); - if (SUCCEEDED(hr)) - { - hr = IClientSecurity_QueryBlanket(pCliSec, pProxy, pAuthnSvc, - pAuthzSvc, ppServerPrincName, - pAuthnLevel, pImpLevel, ppAuthInfo, - pCapabilities); - IClientSecurity_Release(pCliSec); - } - - if (FAILED(hr)) ERR("-- failed with 0x%08x\n", hr); - return hr; -}
/*********************************************************************** * CoSetProxyBlanket [OLE32.@] diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index 0713a989eed..c737b2e386e 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -62,7 +62,7 @@ @ stdcall CoMarshalInterface(ptr ptr ptr long ptr long) @ stub CoQueryAuthenticationServices @ stdcall CoQueryClientBlanket(ptr ptr ptr ptr ptr ptr ptr) -@ stdcall CoQueryProxyBlanket(ptr ptr ptr ptr ptr ptr ptr ptr) +@ stdcall CoQueryProxyBlanket(ptr ptr ptr ptr ptr ptr ptr ptr) combase.CoQueryProxyBlanket @ stub CoQueryReleaseObject @ stdcall CoRegisterChannelHook(ptr ptr) @ stdcall CoRegisterClassObject(ptr ptr long long ptr)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=76570
Your paranoid android.
=== debiant (32 bit WoW report) ===
ole32: clipboard.c:1051: Test failed: OleIsCurrentClipboard returned 0 clipboard.c:1119: Test failed: 1 WM_DRAWCLIPBOARD received
Signed-off-by: Huw Davies huw@codeweavers.com
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)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=76571
Your paranoid android.
=== debiant (32 bit WoW report) ===
ole32: clipboard.c:1051: Test failed: OleIsCurrentClipboard returned 0 clipboard.c:1119: Test failed: 1 WM_DRAWCLIPBOARD received
=== debiant (64 bit WoW report) ===
ole32: clipboard.c:1159: Test failed: got 800401d0 clipboard.c:1175: Test failed: got 800401d0 clipboard.c:1182: Test failed: data objects match clipboard.c:1185: Test failed: Failed to clear clipboard, hr 0x800401d0. clipboard.c:1190: Test failed: data objects match clipboard.c:1191: Test failed: data objects match clipboard.c:1201: Test failed: got 800401d0 clipboard.c:1213: Test failed: got 800401d0 clipboard.c:1214: Test failed: GetData not called clipboard.c:1217: Test failed: 1 1 clipboard.c:1223: Test failed: got 800401d0 clipboard.c:1224: Test failed: GetData not called clipboard.c:1228: Test failed: 1 clipboard.c:1239: Test failed: got 800401d0 clipboard.c:1250: Test failed: got 800401d0 clipboard.c:1256: Test failed: got 800401d0 clipboard.c:1257: Test failed: GetData not called clipboard.c:1263: Test failed: 1 1 clipboard.c:1266: Test failed: Failed to clear clipboard, hr 0x800401d0. clipboard.c:1269: Test failed: 1 clipboard.c:1281: Test failed: Failed to clear clipboard, hr 0x800401d0. clipboard.c:1283: Test failed: 1 1 clipboard.c:1287: Test failed: 1
Signed-off-by: Huw Davies huw@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/combase.c | 21 +++++++++++++++++++++ dlls/combase/combase.spec | 2 +- dlls/ole32/compobj.c | 35 ----------------------------------- dlls/ole32/ole32.spec | 2 +- 4 files changed, 23 insertions(+), 37 deletions(-)
diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c index b87c6f19bac..595a7569b09 100644 --- a/dlls/combase/combase.c +++ b/dlls/combase/combase.c @@ -503,3 +503,24 @@ HRESULT WINAPI CoSetProxyBlanket(IUnknown *proxy, DWORD authn_service, DWORD aut if (FAILED(hr)) ERR("-- failed with %#x.\n", hr); return hr; } + +/*********************************************************************** + * CoCopyProxy (combase.@) + */ +HRESULT WINAPI CoCopyProxy(IUnknown *proxy, IUnknown **proxy_copy) +{ + IClientSecurity *client_security; + HRESULT hr; + + TRACE("%p, %p.\n", proxy, proxy_copy); + + hr = IUnknown_QueryInterface(proxy, &IID_IClientSecurity, (void **)&client_security); + if (SUCCEEDED(hr)) + { + hr = IClientSecurity_CopyProxy(client_security, proxy, proxy_copy); + 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 88d3adeec9e..669b42486fd 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -75,7 +75,7 @@ @ stdcall CoAddRefServerProcess() ole32.CoAddRefServerProcess @ stub CoAllowUnmarshalerCLSID @ stub CoCancelCall -@ stdcall CoCopyProxy(ptr ptr) ole32.CoCopyProxy +@ stdcall CoCopyProxy(ptr ptr) @ stub CoCreateErrorInfo @ stdcall CoCreateFreeThreadedMarshaler(ptr ptr) ole32.CoCreateFreeThreadedMarshaler @ stdcall CoCreateGuid(ptr) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index aeb7c4d29c2..b1fedf17c88 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -4192,41 +4192,6 @@ HRESULT WINAPI CoAllowSetForegroundWindow(IUnknown *pUnk, void *pvReserved) return S_OK; }
-/*********************************************************************** - * CoCopyProxy [OLE32.@] - * - * Copies a proxy. - * - * PARAMS - * pProxy [I] Pointer to the proxy object. - * ppCopy [O] Copy of the proxy. - * - * RETURNS - * Success: S_OK. - * Failure: HRESULT code. - * - * SEE ALSO - * CoQueryProxyBlanket, CoSetProxyBlanket. - */ -HRESULT WINAPI CoCopyProxy(IUnknown *pProxy, IUnknown **ppCopy) -{ - IClientSecurity *pCliSec; - HRESULT hr; - - TRACE("%p\n", pProxy); - - hr = IUnknown_QueryInterface(pProxy, &IID_IClientSecurity, (void **)&pCliSec); - if (SUCCEEDED(hr)) - { - hr = IClientSecurity_CopyProxy(pCliSec, pProxy, ppCopy); - IClientSecurity_Release(pCliSec); - } - - if (FAILED(hr)) ERR("-- failed with 0x%08x\n", hr); - return hr; -} - - /*********************************************************************** * CoGetCallContext [OLE32.@] * diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index 54725e406ac..c64392d5238 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -9,7 +9,7 @@ @ stdcall CoAddRefServerProcess() @ stdcall CoAllowSetForegroundWindow(ptr ptr) @ stdcall CoBuildVersion() -@ stdcall CoCopyProxy(ptr ptr) +@ stdcall CoCopyProxy(ptr ptr) combase.CoCopyProxy @ stdcall CoCreateFreeThreadedMarshaler(ptr ptr) @ stdcall CoCreateGuid(ptr) combase.CoCreateGuid @ stdcall CoCreateInstance(ptr ptr long ptr ptr)
Signed-off-by: Huw Davies huw@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/combase.c | 23 ++++++++++++++++++ dlls/combase/combase.spec | 2 +- dlls/ole32/compobj.c | 50 --------------------------------------- dlls/ole32/ole32.spec | 2 +- 4 files changed, 25 insertions(+), 52 deletions(-)
diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c index 595a7569b09..5af6b3d9ed6 100644 --- a/dlls/combase/combase.c +++ b/dlls/combase/combase.c @@ -524,3 +524,26 @@ HRESULT WINAPI CoCopyProxy(IUnknown *proxy, IUnknown **proxy_copy) if (FAILED(hr)) ERR("-- failed with %#x.\n", hr); return hr; } + +/*********************************************************************** + * CoQueryClientBlanket (combase.@) + */ +HRESULT WINAPI CoQueryClientBlanket(DWORD *authn_service, DWORD *authz_service, OLECHAR **servername, + DWORD *authn_level, DWORD *imp_level, RPC_AUTHZ_HANDLE *privs, DWORD *capabilities) +{ + IServerSecurity *server_security; + HRESULT hr; + + TRACE("%p, %p, %p, %p, %p, %p, %p.\n", authn_service, authz_service, servername, authn_level, imp_level, + privs, capabilities); + + hr = CoGetCallContext(&IID_IServerSecurity, (void **)&server_security); + if (SUCCEEDED(hr)) + { + hr = IServerSecurity_QueryBlanket(server_security, authn_service, authz_service, servername, authn_level, + imp_level, privs, capabilities); + IServerSecurity_Release(server_security); + } + + return hr; +} diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index 669b42486fd..6d13ea6038e 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -134,7 +134,7 @@ @ stub CoPopServiceDomain @ stub CoPushServiceDomain @ stub CoQueryAuthenticationServices -@ stdcall CoQueryClientBlanket(ptr ptr ptr ptr ptr ptr ptr) ole32.CoQueryClientBlanket +@ stdcall CoQueryClientBlanket(ptr ptr ptr ptr ptr ptr ptr) @ stdcall CoQueryProxyBlanket(ptr ptr ptr ptr ptr ptr ptr ptr) @ stub CoReactivateObject @ stub CoRegisterActivationFilter diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index b1fedf17c88..c4daeb3b3d9 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -4250,56 +4250,6 @@ HRESULT WINAPI CoSwitchCallContext(IUnknown *pObject, IUnknown **ppOldObject) return S_OK; }
-/*********************************************************************** - * CoQueryClientBlanket [OLE32.@] - * - * Retrieves the authentication information about the client of the currently - * executing server call in the current thread. - * - * PARAMS - * pAuthnSvc [O] Optional. The type of authentication service. - * pAuthzSvc [O] Optional. The type of authorization service. - * pServerPrincName [O] Optional. The server prinicple name. - * pAuthnLevel [O] Optional. The authentication level. - * pImpLevel [O] Optional. The impersonation level. - * pPrivs [O] Optional. Information about the privileges of the client. - * pCapabilities [IO] Optional. Flags affecting the security behaviour. - * - * RETURNS - * Success: S_OK. - * Failure: HRESULT code. - * - * SEE ALSO - * CoImpersonateClient, CoRevertToSelf, CoGetCallContext. - */ -HRESULT WINAPI CoQueryClientBlanket( - DWORD *pAuthnSvc, - DWORD *pAuthzSvc, - OLECHAR **pServerPrincName, - DWORD *pAuthnLevel, - DWORD *pImpLevel, - RPC_AUTHZ_HANDLE *pPrivs, - DWORD *pCapabilities) -{ - IServerSecurity *pSrvSec; - HRESULT hr; - - TRACE("(%p, %p, %p, %p, %p, %p, %p)\n", - pAuthnSvc, pAuthzSvc, pServerPrincName, pAuthnLevel, pImpLevel, - pPrivs, pCapabilities); - - hr = CoGetCallContext(&IID_IServerSecurity, (void **)&pSrvSec); - if (SUCCEEDED(hr)) - { - hr = IServerSecurity_QueryBlanket( - pSrvSec, pAuthnSvc, pAuthzSvc, pServerPrincName, pAuthnLevel, - pImpLevel, pPrivs, pCapabilities); - IServerSecurity_Release(pSrvSec); - } - - return hr; -} - /*********************************************************************** * CoImpersonateClient [OLE32.@] * diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index c64392d5238..e08305810fd 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -61,7 +61,7 @@ @ stdcall CoMarshalInterThreadInterfaceInStream(ptr ptr ptr) @ stdcall CoMarshalInterface(ptr ptr ptr long ptr long) @ stub CoQueryAuthenticationServices -@ stdcall CoQueryClientBlanket(ptr ptr ptr ptr ptr ptr ptr) +@ stdcall CoQueryClientBlanket(ptr ptr ptr ptr ptr ptr ptr) combase.CoQueryClientBlanket @ stdcall CoQueryProxyBlanket(ptr ptr ptr ptr ptr ptr ptr ptr) combase.CoQueryProxyBlanket @ stub CoQueryReleaseObject @ stdcall CoRegisterChannelHook(ptr ptr)
Signed-off-by: Huw Davies huw@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/combase.c | 20 ++++++++++++++++++++ dlls/combase/combase.spec | 2 +- dlls/ole32/compobj.c | 38 -------------------------------------- dlls/ole32/ole32.spec | 2 +- 4 files changed, 22 insertions(+), 40 deletions(-)
diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c index 5af6b3d9ed6..e63cce00dda 100644 --- a/dlls/combase/combase.c +++ b/dlls/combase/combase.c @@ -547,3 +547,23 @@ HRESULT WINAPI CoQueryClientBlanket(DWORD *authn_service, DWORD *authz_service,
return hr; } + +/*********************************************************************** + * CoImpersonateClient (combase.@) + */ +HRESULT WINAPI CoImpersonateClient(void) +{ + IServerSecurity *server_security; + HRESULT hr; + + TRACE("\n"); + + hr = CoGetCallContext(&IID_IServerSecurity, (void **)&server_security); + if (SUCCEEDED(hr)) + { + hr = IServerSecurity_ImpersonateClient(server_security); + IServerSecurity_Release(server_security); + } + + return hr; +} diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index 6d13ea6038e..3122588d7e3 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -120,7 +120,7 @@ @ stub CoGetStdMarshalEx @ stub CoGetSystemSecurityPermissions @ stdcall CoGetTreatAsClass(ptr ptr) ole32.CoGetTreatAsClass -@ stdcall CoImpersonateClient() ole32.CoImpersonateClient +@ stdcall CoImpersonateClient() @ stdcall CoIncrementMTAUsage(ptr) ole32.CoIncrementMTAUsage @ stdcall CoInitializeEx(ptr long) ole32.CoInitializeEx @ stdcall CoInitializeSecurity(ptr long ptr ptr long long ptr long ptr) ole32.CoInitializeSecurity diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index c4daeb3b3d9..507cc451e20 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -4250,44 +4250,6 @@ HRESULT WINAPI CoSwitchCallContext(IUnknown *pObject, IUnknown **ppOldObject) return S_OK; }
-/*********************************************************************** - * CoImpersonateClient [OLE32.@] - * - * Impersonates the client of the currently executing server call in the - * current thread. - * - * PARAMS - * None. - * - * RETURNS - * Success: S_OK. - * Failure: HRESULT code. - * - * NOTES - * If this function fails then the current thread will not be impersonating - * the client and all actions will take place on behalf of the server. - * Therefore, it is important to check the return value from this function. - * - * SEE ALSO - * CoRevertToSelf, CoQueryClientBlanket, CoGetCallContext. - */ -HRESULT WINAPI CoImpersonateClient(void) -{ - IServerSecurity *pSrvSec; - HRESULT hr; - - TRACE("\n"); - - hr = CoGetCallContext(&IID_IServerSecurity, (void **)&pSrvSec); - if (SUCCEEDED(hr)) - { - hr = IServerSecurity_ImpersonateClient(pSrvSec); - IServerSecurity_Release(pSrvSec); - } - - return hr; -} - /*********************************************************************** * CoRevertToSelf [OLE32.@] * diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index e08305810fd..049dd0ad616 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -47,7 +47,7 @@ @ stdcall CoGetState(ptr) @ stub CoGetTIDFromIPID @ stdcall CoGetTreatAsClass(ptr ptr) -@ stdcall CoImpersonateClient() +@ stdcall CoImpersonateClient() combase.CoImpersonateClient @ stdcall CoIncrementMTAUsage(ptr) @ stdcall CoInitialize(ptr) @ stdcall CoInitializeEx(ptr long)
Signed-off-by: Huw Davies huw@codeweavers.com