From 4b4c5feb3d681990f575ba5844fea89e7b9f39a8 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 24 May 2015 17:56:51 +0200 Subject: [PATCH] Added patch with stubbed ISWbemSecurity interfaces in wbemdisp. --- README.md | 3 +- debian/changelog | 1 + patches/patchinstall.sh | 40 ++- ...sp-Add-ISWbemSecurity-stub-interface.patch | 304 ++++++++++++++++++ patches/wbemdisp-ISWbemSecurity/definition | 1 + 5 files changed, 336 insertions(+), 13 deletions(-) create mode 100644 patches/wbemdisp-ISWbemSecurity/0001-wbemdisp-Add-ISWbemSecurity-stub-interface.patch create mode 100644 patches/wbemdisp-ISWbemSecurity/definition diff --git a/README.md b/README.md index 5ac794c0..a03f1ee9 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,9 @@ Wine. All those differences are also documented on the Included bug fixes and improvements ----------------------------------- -**Bug fixes and features included in the next upcoming release [1]:** +**Bug fixes and features included in the next upcoming release [2]:** +* Add stubbed ISWbemSecurity interfaces in wbemdisp * Also handle '\r' as whitespace in wbemprox queries diff --git a/debian/changelog b/debian/changelog index 3dc55c87..14884991 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ wine-staging (1.7.44) UNRELEASED; urgency=low * Added patch to handle '\r' as whitespace in wbemprox queries. + * Added patch with stubbed ISWbemSecurity interfaces in wbemdisp. * Removed patch to reset device state in SysKeyboard*Impl_Acquire (accepted upstream). * Removed patch to avoid creating thread queues for foreign threads in diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index cdce820a..8d970bdc 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -236,6 +236,7 @@ patch_enable_all () enable_vcomp_Stub_Functions="$1" enable_version_VerQueryValue="$1" enable_version_VersionInfoEx="$1" + enable_wbemdisp_ISWbemSecurity="$1" enable_wbemprox_Whitespace="$1" enable_wiaservc_IEnumWIA_DEV_INFO="$1" enable_windowscodecs_GIF_Decoder="$1" @@ -767,6 +768,9 @@ patch_enable () version-VersionInfoEx) enable_version_VersionInfoEx="$2" ;; + wbemdisp-ISWbemSecurity) + enable_wbemdisp_ISWbemSecurity="$2" + ;; wbemprox-Whitespace) enable_wbemprox_Whitespace="$2" ;; @@ -2646,6 +2650,18 @@ if test "$enable_dxgi_GetDesc" -eq 1; then ) >> "$patchlist" fi +# Patchset makedep-PARENTSPEC +# | +# | Modified files: +# | * tools/makedep.c +# | +if test "$enable_makedep_PARENTSPEC" -eq 1; then + patch_apply makedep-PARENTSPEC/0001-makedep-Add-support-for-PARENTSPEC-Makefile-variable.patch + ( + echo '+ { "Sebastian Lackner", "makedep: Add support for PARENTSPEC Makefile variable.", 1 },'; + ) >> "$patchlist" +fi + # Patchset ntdll-DllRedirects # | # | Modified files: @@ -2666,18 +2682,6 @@ if test "$enable_ntdll_DllRedirects" -eq 1; then ) >> "$patchlist" fi -# Patchset makedep-PARENTSPEC -# | -# | Modified files: -# | * tools/makedep.c -# | -if test "$enable_makedep_PARENTSPEC" -eq 1; then - patch_apply makedep-PARENTSPEC/0001-makedep-Add-support-for-PARENTSPEC-Makefile-variable.patch - ( - echo '+ { "Sebastian Lackner", "makedep: Add support for PARENTSPEC Makefile variable.", 1 },'; - ) >> "$patchlist" -fi - # Patchset wined3d-CSMT_Helper # | # | Modified files: @@ -5153,6 +5157,18 @@ if test "$enable_version_VersionInfoEx" -eq 1; then ) >> "$patchlist" fi +# Patchset wbemdisp-ISWbemSecurity +# | +# | Modified files: +# | * dlls/wbemdisp/locator.c +# | +if test "$enable_wbemdisp_ISWbemSecurity" -eq 1; then + patch_apply wbemdisp-ISWbemSecurity/0001-wbemdisp-Add-ISWbemSecurity-stub-interface.patch + ( + echo '+ { "Michael Müller", "wbemdisp: Add ISWbemSecurity stub interface.", 1 },'; + ) >> "$patchlist" +fi + # Patchset wbemprox-Whitespace # | # | Modified files: diff --git a/patches/wbemdisp-ISWbemSecurity/0001-wbemdisp-Add-ISWbemSecurity-stub-interface.patch b/patches/wbemdisp-ISWbemSecurity/0001-wbemdisp-Add-ISWbemSecurity-stub-interface.patch new file mode 100644 index 00000000..c786407b --- /dev/null +++ b/patches/wbemdisp-ISWbemSecurity/0001-wbemdisp-Add-ISWbemSecurity-stub-interface.patch @@ -0,0 +1,304 @@ +From fe0a9fc45c18dc6dc76f963c9e904a754e1792d1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +Date: Sun, 24 May 2015 03:56:52 +0200 +Subject: wbemdisp: Add ISWbemSecurity stub interface. + +--- + dlls/wbemdisp/locator.c | 249 +++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 244 insertions(+), 5 deletions(-) + +diff --git a/dlls/wbemdisp/locator.c b/dlls/wbemdisp/locator.c +index 3465eb1..756205d 100644 +--- a/dlls/wbemdisp/locator.c ++++ b/dlls/wbemdisp/locator.c +@@ -37,6 +37,7 @@ + WINE_DEFAULT_DEBUG_CHANNEL(wbemdisp); + + static HRESULT EnumVARIANT_create( IEnumWbemClassObject *, IEnumVARIANT ** ); ++static HRESULT ISWbemSecurity_create( ISWbemSecurity ** ); + + enum type_id + { +@@ -44,6 +45,7 @@ enum type_id + ISWbemObject_tid, + ISWbemObjectSet_tid, + ISWbemServices_tid, ++ ISWbemSecurity_tid, + last_tid + }; + +@@ -55,7 +57,8 @@ static REFIID wbemdisp_tid_id[] = + &IID_ISWbemLocator, + &IID_ISWbemObject, + &IID_ISWbemObjectSet, +- &IID_ISWbemServices ++ &IID_ISWbemServices, ++ &IID_ISWbemSecurity + }; + + static HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret ) +@@ -1146,8 +1149,12 @@ static HRESULT WINAPI services_get_Security_( + ISWbemServices *iface, + ISWbemSecurity **objWbemSecurity ) + { +- FIXME( "\n" ); +- return E_NOTIMPL; ++ TRACE( "%p, %p\n", iface, objWbemSecurity ); ++ ++ if (!objWbemSecurity) ++ return E_INVALIDARG; ++ ++ return ISWbemSecurity_create( objWbemSecurity ); + } + + static const ISWbemServicesVtbl services_vtbl = +@@ -1400,8 +1407,12 @@ static HRESULT WINAPI locator_get_Security_( + ISWbemLocator *iface, + ISWbemSecurity **objWbemSecurity ) + { +- FIXME( "%p, %p\n", iface, objWbemSecurity ); +- return E_NOTIMPL; ++ TRACE( "%p, %p\n", iface, objWbemSecurity ); ++ ++ if (!objWbemSecurity) ++ return E_INVALIDARG; ++ ++ return ISWbemSecurity_create( objWbemSecurity ); + } + + static const ISWbemLocatorVtbl locator_vtbl = +@@ -1432,3 +1443,231 @@ HRESULT SWbemLocator_create( void **obj ) + TRACE( "returning iface %p\n", *obj ); + return S_OK; + } ++ ++struct security ++{ ++ ISWbemSecurity ISWbemSecurity_iface; ++ LONG refs; ++ WbemImpersonationLevelEnum implevel; ++ WbemAuthenticationLevelEnum authlevel; ++}; ++ ++static inline struct security *impl_from_ISWbemSecurity( ISWbemSecurity *iface ) ++{ ++ return CONTAINING_RECORD( iface, struct security, ISWbemSecurity_iface ); ++} ++ ++static ULONG WINAPI security_AddRef( ++ ISWbemSecurity *iface ) ++{ ++ struct security *security = impl_from_ISWbemSecurity( iface ); ++ return InterlockedIncrement( &security->refs ); ++} ++ ++static ULONG WINAPI security_Release( ++ ISWbemSecurity *iface ) ++{ ++ struct security *security = impl_from_ISWbemSecurity( iface ); ++ LONG refs = InterlockedDecrement( &security->refs ); ++ if (!refs) ++ { ++ TRACE( "destroying %p\n", security ); ++ heap_free( security ); ++ } ++ return refs; ++} ++ ++static HRESULT WINAPI security_QueryInterface( ++ ISWbemSecurity *iface, ++ REFIID riid, ++ void **ppvObject ) ++{ ++ struct security *security = impl_from_ISWbemSecurity( iface ); ++ TRACE( "%p, %s, %p\n", security, debugstr_guid( riid ), ppvObject ); ++ ++ if (IsEqualGUID( riid, &IID_ISWbemSecurity ) || ++ IsEqualGUID( riid, &IID_IDispatch ) || ++ IsEqualGUID( riid, &IID_IUnknown )) ++ { ++ *ppvObject = iface; ++ } ++ else ++ { ++ FIXME( "interface %s not implemented\n", debugstr_guid(riid) ); ++ return E_NOINTERFACE; ++ } ++ ISWbemSecurity_AddRef( iface ); ++ return S_OK; ++} ++ ++static HRESULT WINAPI security_GetTypeInfoCount( ++ ISWbemSecurity *iface, ++ UINT *count ) ++{ ++ struct security *security = impl_from_ISWbemSecurity( iface ); ++ TRACE( "%p, %p\n", security, count ); ++ ++ *count = 1; ++ return S_OK; ++} ++ ++static HRESULT WINAPI security_GetTypeInfo( ++ ISWbemSecurity *iface, ++ UINT index, ++ LCID lcid, ++ ITypeInfo **info ) ++{ ++ struct security *security = impl_from_ISWbemSecurity( iface ); ++ TRACE( "%p, %u, %u, %p\n", security, index, lcid, info ); ++ ++ return get_typeinfo( ISWbemSecurity_tid, info ); ++} ++ ++static HRESULT WINAPI security_GetIDsOfNames( ++ ISWbemSecurity *iface, ++ REFIID riid, ++ LPOLESTR *names, ++ UINT count, ++ LCID lcid, ++ DISPID *dispid ) ++{ ++ struct security *security = impl_from_ISWbemSecurity( iface ); ++ ITypeInfo *typeinfo; ++ HRESULT hr; ++ ++ TRACE( "%p, %s, %p, %u, %u, %p\n", security, debugstr_guid(riid), names, count, lcid, dispid ); ++ ++ if (!names || !count || !dispid) return E_INVALIDARG; ++ ++ hr = get_typeinfo( ISWbemSecurity_tid, &typeinfo ); ++ if (SUCCEEDED(hr)) ++ { ++ hr = ITypeInfo_GetIDsOfNames( typeinfo, names, count, dispid ); ++ ITypeInfo_Release( typeinfo ); ++ } ++ return hr; ++} ++ ++static HRESULT WINAPI security_Invoke( ++ ISWbemSecurity *iface, ++ DISPID member, ++ REFIID riid, ++ LCID lcid, ++ WORD flags, ++ DISPPARAMS *params, ++ VARIANT *result, ++ EXCEPINFO *excep_info, ++ UINT *arg_err ) ++{ ++ struct security *security = impl_from_ISWbemSecurity( iface ); ++ ITypeInfo *typeinfo; ++ HRESULT hr; ++ ++ TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", security, member, debugstr_guid(riid), ++ lcid, flags, params, result, excep_info, arg_err ); ++ ++ hr = get_typeinfo( ISWbemSecurity_tid, &typeinfo ); ++ if (SUCCEEDED(hr)) ++ { ++ hr = ITypeInfo_Invoke( typeinfo, &security->ISWbemSecurity_iface, member, flags, ++ params, result, excep_info, arg_err ); ++ ITypeInfo_Release( typeinfo ); ++ } ++ return hr; ++} ++ ++static HRESULT WINAPI security_get_ImpersonationLevel_( ++ ISWbemSecurity *iface, ++ WbemImpersonationLevelEnum *impersonation_level ) ++{ ++ struct security *security = impl_from_ISWbemSecurity( iface ); ++ FIXME( "%p, %p: stub\n", security, impersonation_level ); ++ ++ if (!impersonation_level) ++ return E_INVALIDARG; ++ ++ *impersonation_level = security->implevel; ++ return S_OK; ++} ++ ++static HRESULT WINAPI security_put_ImpersonationLevel_( ++ ISWbemSecurity *iface, ++ WbemImpersonationLevelEnum impersonation_level ) ++{ ++ struct security *security = impl_from_ISWbemSecurity( iface ); ++ FIXME( "%p, %d: stub\n", security, impersonation_level ); ++ ++ security->implevel = impersonation_level; ++ return S_OK; ++} ++ ++static HRESULT WINAPI security_get_AuthenticationLevel_( ++ ISWbemSecurity *iface, ++ WbemAuthenticationLevelEnum *authentication_level ) ++{ ++ struct security *security = impl_from_ISWbemSecurity( iface ); ++ FIXME( "%p, %p: stub\n", security, authentication_level ); ++ ++ if (!authentication_level) ++ return E_INVALIDARG; ++ ++ *authentication_level = security->authlevel; ++ return S_OK; ++} ++ ++static HRESULT WINAPI security_put_AuthenticationLevel_( ++ ISWbemSecurity *iface, ++ WbemAuthenticationLevelEnum authentication_level ) ++{ ++ struct security *security = impl_from_ISWbemSecurity( iface ); ++ FIXME( "%p, %d: stub\n", security, authentication_level ); ++ ++ security->authlevel = authentication_level; ++ return S_OK; ++} ++ ++static HRESULT WINAPI security_get_Privileges_( ++ ISWbemSecurity *iface, ++ ISWbemPrivilegeSet **privilege_set ) ++{ ++ struct security *security = impl_from_ISWbemSecurity( iface ); ++ FIXME( "%p, %p: stub\n", security, privilege_set ); ++ ++ if (!privilege_set) ++ return E_INVALIDARG; ++ ++ return E_NOTIMPL; ++} ++ ++static const ISWbemSecurityVtbl security_vtbl = ++{ ++ security_QueryInterface, ++ security_AddRef, ++ security_Release, ++ security_GetTypeInfoCount, ++ security_GetTypeInfo, ++ security_GetIDsOfNames, ++ security_Invoke, ++ security_get_ImpersonationLevel_, ++ security_put_ImpersonationLevel_, ++ security_get_AuthenticationLevel_, ++ security_put_AuthenticationLevel_, ++ security_get_Privileges_ ++}; ++ ++static HRESULT ISWbemSecurity_create( ISWbemSecurity **obj ) ++{ ++ struct security *security; ++ ++ TRACE( "%p\n", obj ); ++ ++ if (!(security = heap_alloc( sizeof(*security) ))) return E_OUTOFMEMORY; ++ security->ISWbemSecurity_iface.lpVtbl = &security_vtbl; ++ security->refs = 1; ++ security->implevel = wbemImpersonationLevelAnonymous; ++ security->authlevel = wbemAuthenticationLevelDefault; ++ ++ *obj = &security->ISWbemSecurity_iface; ++ TRACE( "returning iface %p\n", *obj ); ++ return S_OK; ++} +-- +2.4.0 + diff --git a/patches/wbemdisp-ISWbemSecurity/definition b/patches/wbemdisp-ISWbemSecurity/definition new file mode 100644 index 00000000..fada1fb9 --- /dev/null +++ b/patches/wbemdisp-ISWbemSecurity/definition @@ -0,0 +1 @@ +Fixes: Add stubbed ISWbemSecurity interfaces in wbemdisp