winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2008
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1215 discussions
Start a n
N
ew thread
Huw Davies : inetcomm: Add wrapper functions MimeOleFindCharset and MimeOleGetDefaultCharset.
by Alexandre Julliard
23 Sep '08
23 Sep '08
Module: wine Branch: master Commit: 3093023979f245e67d4123f79d273b5fb08e7b0b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3093023979f245e67d4123f79…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Sep 23 12:07:43 2008 +0100 inetcomm: Add wrapper functions MimeOleFindCharset and MimeOleGetDefaultCharset. --- dlls/inetcomm/inetcomm.spec | 4 ++-- dlls/inetcomm/mimeintl.c | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/dlls/inetcomm/inetcomm.spec b/dlls/inetcomm/inetcomm.spec index 4db2c7d..86669c8 100644 --- a/dlls/inetcomm/inetcomm.spec +++ b/dlls/inetcomm/inetcomm.spec @@ -59,7 +59,7 @@ @ stub MimeOleDecodeHeader @ stub MimeOleEncodeHeader @ stub MimeOleFileTimeToInetDate -@ stub MimeOleFindCharset +@ stdcall MimeOleFindCharset(str ptr) @ stub MimeOleGenerateCID @ stub MimeOleGenerateFileName @ stub MimeOleGenerateMID @@ -71,7 +71,7 @@ @ stub MimeOleGetCodePageCharset @ stub MimeOleGetCodePageInfo @ stub MimeOleGetContentTypeExt -@ stub MimeOleGetDefaultCharset +@ stdcall MimeOleGetDefaultCharset(ptr) @ stub MimeOleGetExtContentType @ stub MimeOleGetFileExtension @ stub MimeOleGetFileInfo diff --git a/dlls/inetcomm/mimeintl.c b/dlls/inetcomm/mimeintl.c index 0029af8..6d37147 100644 --- a/dlls/inetcomm/mimeintl.c +++ b/dlls/inetcomm/mimeintl.c @@ -547,6 +547,22 @@ HRESULT WINAPI MimeOleGetInternat(IMimeInternational **internat) return S_OK; } +HRESULT WINAPI MimeOleFindCharset(LPCSTR name, LPHCHARSET charset) +{ + IMimeInternational *internat; + HRESULT hr; + + TRACE("(%s, %p)\n", debugstr_a(name), charset); + + hr = MimeOleGetInternat(&internat); + if(SUCCEEDED(hr)) + { + hr = IMimeInternational_FindCharset(internat, name, charset); + IMimeInternational_Release(internat); + } + return hr; +} + HRESULT WINAPI MimeOleGetCharsetInfo(HCHARSET hCharset, LPINETCSETINFO pCsetInfo) { IMimeInternational *internat; @@ -560,5 +576,21 @@ HRESULT WINAPI MimeOleGetCharsetInfo(HCHARSET hCharset, LPINETCSETINFO pCsetInfo hr = IMimeInternational_GetCharsetInfo(internat, hCharset, pCsetInfo); IMimeInternational_Release(internat); } - return S_OK; + return hr; +} + +HRESULT WINAPI MimeOleGetDefaultCharset(LPHCHARSET charset) +{ + IMimeInternational *internat; + HRESULT hr; + + TRACE("(%p)\n", charset); + + hr = MimeOleGetInternat(&internat); + if(SUCCEEDED(hr)) + { + hr = IMimeInternational_GetDefaultCharset(internat, charset); + IMimeInternational_Release(internat); + } + return hr; }
1
0
0
0
Alistair Leslie-Hughes : mshtml: Implement IHTMLBodyElement put_background.
by Alexandre Julliard
23 Sep '08
23 Sep '08
Module: wine Branch: master Commit: b9356960db9808f6de7bace41b2c6352416d008f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b9356960db9808f6de7bace41…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Tue Sep 23 20:03:58 2008 +1000 mshtml: Implement IHTMLBodyElement put_background. --- dlls/mshtml/htmlbody.c | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c index 9fad187..e5545f5 100644 --- a/dlls/mshtml/htmlbody.c +++ b/dlls/mshtml/htmlbody.c @@ -140,8 +140,23 @@ static HRESULT WINAPI HTMLBodyElement_Invoke(IHTMLBodyElement *iface, DISPID dis static HRESULT WINAPI HTMLBodyElement_put_background(IHTMLBodyElement *iface, BSTR v) { HTMLBodyElement *This = HTMLBODY_THIS(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + HRESULT hr = S_OK; + nsAString nsstr; + nsresult nsres; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + nsAString_Init(&nsstr, v); + + nsres = nsIDOMHTMLBodyElement_SetBackground(This->nsbody, &nsstr); + if(!NS_SUCCEEDED(nsres)) + { + hr = E_FAIL; + } + + nsAString_Finish(&nsstr); + + return hr; } static HRESULT WINAPI HTMLBodyElement_get_background(IHTMLBodyElement *iface, BSTR *p)
1
0
0
0
Austin English : mshtml/tests: Fix gcc warnings.
by Alexandre Julliard
23 Sep '08
23 Sep '08
Module: wine Branch: master Commit: db64798209332916291bf80b5e2abe28703f3541 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=db64798209332916291bf80b5…
Author: Austin English <austinenglish(a)gmail.com> Date: Tue Sep 23 06:00:47 2008 -0500 mshtml/tests: Fix gcc warnings. Based on a patch by Dmitry Timoshkov. --- dlls/mshtml/tests/dom.c | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 56c5057..7d3b3e3 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -87,12 +87,12 @@ typedef enum { ET_IMG } elem_type_t; -static REFIID const none_iids[] = { +static const IID * const none_iids[] = { &IID_IUnknown, NULL }; -static REFIID const elem_iids[] = { +static const IID * const elem_iids[] = { &IID_IHTMLDOMNode, &IID_IHTMLDOMNode2, &IID_IHTMLElement, @@ -102,7 +102,7 @@ static REFIID const elem_iids[] = { NULL }; -static REFIID const body_iids[] = { +static const IID * const body_iids[] = { &IID_IHTMLDOMNode, &IID_IHTMLDOMNode2, &IID_IHTMLElement, @@ -114,7 +114,7 @@ static REFIID const body_iids[] = { NULL }; -static REFIID const anchor_iids[] = { +static const IID * const anchor_iids[] = { &IID_IHTMLDOMNode, &IID_IHTMLDOMNode2, &IID_IHTMLElement, @@ -125,7 +125,7 @@ static REFIID const anchor_iids[] = { NULL }; -static REFIID const input_iids[] = { +static const IID * const input_iids[] = { &IID_IHTMLDOMNode, &IID_IHTMLDOMNode2, &IID_IHTMLElement, @@ -137,7 +137,7 @@ static REFIID const input_iids[] = { NULL }; -static REFIID const select_iids[] = { +static const IID * const select_iids[] = { &IID_IHTMLDOMNode, &IID_IHTMLDOMNode2, &IID_IHTMLElement, @@ -148,7 +148,7 @@ static REFIID const select_iids[] = { NULL }; -static REFIID const textarea_iids[] = { +static const IID * const textarea_iids[] = { &IID_IHTMLDOMNode, &IID_IHTMLDOMNode2, &IID_IHTMLElement, @@ -159,7 +159,7 @@ static REFIID const textarea_iids[] = { NULL }; -static REFIID const option_iids[] = { +static const IID * const option_iids[] = { &IID_IHTMLDOMNode, &IID_IHTMLDOMNode2, &IID_IHTMLElement, @@ -170,7 +170,7 @@ static REFIID const option_iids[] = { NULL }; -static REFIID const table_iids[] = { +static const IID * const table_iids[] = { &IID_IHTMLDOMNode, &IID_IHTMLDOMNode2, &IID_IHTMLElement, @@ -181,7 +181,7 @@ static REFIID const table_iids[] = { NULL }; -static REFIID const script_iids[] = { +static const IID * const script_iids[] = { &IID_IHTMLDOMNode, &IID_IHTMLDOMNode2, &IID_IHTMLElement, @@ -192,20 +192,20 @@ static REFIID const script_iids[] = { NULL }; -static REFIID const text_iids[] = { +static const IID * const text_iids[] = { &IID_IHTMLDOMNode, &IID_IHTMLDOMNode2, &IID_IHTMLDOMTextNode, NULL }; -static REFIID const location_iids[] = { +static const IID * const location_iids[] = { &IID_IDispatch, &IID_IHTMLLocation, NULL }; -static REFIID const window_iids[] = { +static const IID * const window_iids[] = { &IID_IDispatch, &IID_IHTMLWindow2, &IID_IHTMLWindow3, @@ -213,7 +213,7 @@ static REFIID const window_iids[] = { NULL }; -static REFIID const comment_iids[] = { +static const IID * const comment_iids[] = { &IID_IHTMLDOMNode, &IID_IHTMLDOMNode2, &IID_IHTMLElement, @@ -224,7 +224,7 @@ static REFIID const comment_iids[] = { NULL }; -static REFIID const img_iids[] = { +static const IID * const img_iids[] = { &IID_IHTMLDOMNode, &IID_IHTMLDOMNode2, &IID_IHTMLElement, @@ -235,7 +235,7 @@ static REFIID const img_iids[] = { NULL }; -static REFIID const generic_iids[] = { +static const IID * const generic_iids[] = { &IID_IHTMLDOMNode, &IID_IHTMLDOMNode2, &IID_IHTMLElement,
1
0
0
0
Henri Verbeet : secur32: Allow gnutls debug output to be shown.
by Alexandre Julliard
23 Sep '08
23 Sep '08
Module: wine Branch: master Commit: 74539728b98b1969b7c7b84ca2c36f1009c9dc45 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74539728b98b1969b7c7b84ca…
Author: Henri Verbeet <hverbeet(a)gmail.com> Date: Mon Sep 22 22:14:04 2008 +0200 secur32: Allow gnutls debug output to be shown. --- dlls/secur32/schannel.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c index e24f7f5..aea407e 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -44,6 +44,8 @@ MAKE_FUNCPTR(gnutls_certificate_allocate_credentials); MAKE_FUNCPTR(gnutls_certificate_free_credentials); MAKE_FUNCPTR(gnutls_global_deinit); MAKE_FUNCPTR(gnutls_global_init); +MAKE_FUNCPTR(gnutls_global_set_log_function); +MAKE_FUNCPTR(gnutls_global_set_log_level); #undef MAKE_FUNCPTR enum schan_handle_type @@ -446,6 +448,11 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW( return ret; } +static void schan_gnutls_log(int level, const char *msg) +{ + TRACE("<%d> %s", level, msg); +} + static const SecurityFunctionTableA schanTableA = { 1, NULL, /* EnumerateSecurityPackagesA */ @@ -537,6 +544,8 @@ void SECUR32_initSchannelSP(void) LOAD_FUNCPTR(gnutls_certificate_free_credentials) LOAD_FUNCPTR(gnutls_global_deinit) LOAD_FUNCPTR(gnutls_global_init) + LOAD_FUNCPTR(gnutls_global_set_log_function) + LOAD_FUNCPTR(gnutls_global_set_log_level) #undef LOAD_FUNCPTR provider = SECUR32_addProvider(&schanTableA, &schanTableW, schannelDllName); @@ -574,6 +583,11 @@ void SECUR32_initSchannelSP(void) schan_handle_table_size = 64; pgnutls_global_init(); + if (TRACE_ON(secur32)) + { + pgnutls_global_set_log_level(4); + pgnutls_global_set_log_function(schan_gnutls_log); + } } }
1
0
0
0
Henri Verbeet : secur32: Allocate schannel client credentials.
by Alexandre Julliard
23 Sep '08
23 Sep '08
Module: wine Branch: master Commit: fde1e003faf19d5c80ca7bd7b205f7294891a2fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fde1e003faf19d5c80ca7bd7b…
Author: Henri Verbeet <hverbeet(a)gmail.com> Date: Mon Sep 22 22:14:04 2008 +0200 secur32: Allocate schannel client credentials. --- dlls/secur32/schannel.c | 55 +++++++++++++++++++++++++++++++++++++++++- dlls/secur32/secur32.c | 2 + dlls/secur32/secur32_priv.h | 3 ++ 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c index 1633a70..e24f7f5 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -19,19 +19,33 @@ * implementation. */ #include "config.h" +#include "wine/port.h" #include <stdarg.h> +#ifdef SONAME_LIBGNUTLS +#include <gnutls/gnutls.h> +#endif + #include "windef.h" #include "winbase.h" #include "sspi.h" #include "schannel.h" #include "secur32_priv.h" #include "wine/debug.h" +#include "wine/library.h" WINE_DEFAULT_DEBUG_CHANNEL(secur32); #ifdef SONAME_LIBGNUTLS +static void *libgnutls_handle; +#define MAKE_FUNCPTR(f) static typeof(f) * p##f +MAKE_FUNCPTR(gnutls_certificate_allocate_credentials); +MAKE_FUNCPTR(gnutls_certificate_free_credentials); +MAKE_FUNCPTR(gnutls_global_deinit); +MAKE_FUNCPTR(gnutls_global_init); +#undef MAKE_FUNCPTR + enum schan_handle_type { SCHAN_HANDLE_CRED, @@ -47,6 +61,7 @@ struct schan_handle struct schan_credentials { ULONG credential_use; + gnutls_certificate_credentials_t credentials; }; static struct schan_handle *schan_handle_table; @@ -273,6 +288,7 @@ static SECURITY_STATUS schan_AcquireClientCredentials(const SCHANNEL_CRED *schan } creds->credential_use = SECPKG_CRED_OUTBOUND; + pgnutls_certificate_allocate_credentials(&creds->credentials); phCredential->dwLower = handle; phCredential->dwUpper = 0; @@ -371,6 +387,8 @@ static SECURITY_STATUS SEC_ENTRY schan_FreeCredentialsHandle( creds = schan_free_handle(phCredential->dwLower, SCHAN_HANDLE_CRED); if (!creds) return SEC_E_INVALID_HANDLE; + if (creds->credential_use == SECPKG_CRED_OUTBOUND) + pgnutls_certificate_free_credentials(creds->credentials); HeapFree(GetProcessHeap(), 0, creds); return SEC_E_OK; @@ -496,8 +514,32 @@ static const WCHAR schannelDllName[] = { 's','c','h','a','n','n','e','l','.','d' void SECUR32_initSchannelSP(void) { - SecureProvider *provider = SECUR32_addProvider(&schanTableA, &schanTableW, - schannelDllName); + SecureProvider *provider; + + + libgnutls_handle = wine_dlopen(SONAME_LIBGNUTLS, RTLD_NOW, NULL, 0); + if (!libgnutls_handle) + { + WARN("Failed to load libgnutls.\n"); + return; + } + +#define LOAD_FUNCPTR(f) \ + if (!(p##f = wine_dlsym(libgnutls_handle, #f, NULL, 0))) \ + { \ + ERR("Failed to load %s\n", #f); \ + wine_dlclose(libgnutls_handle, NULL, 0); \ + libgnutls_handle = NULL; \ + return; \ + } + + LOAD_FUNCPTR(gnutls_certificate_allocate_credentials) + LOAD_FUNCPTR(gnutls_certificate_free_credentials) + LOAD_FUNCPTR(gnutls_global_deinit) + LOAD_FUNCPTR(gnutls_global_init) +#undef LOAD_FUNCPTR + + provider = SECUR32_addProvider(&schanTableA, &schanTableW, schannelDllName); if (provider) { @@ -530,11 +572,20 @@ void SECUR32_initSchannelSP(void) schan_handle_table = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 64 * sizeof(*schan_handle_table)); schan_handle_table_size = 64; + + pgnutls_global_init(); } } +void SECUR32_deinitSchannelSP(void) +{ + pgnutls_global_deinit(); + if (libgnutls_handle) wine_dlclose(libgnutls_handle, NULL, 0); +} + #else /* SONAME_LIBGNUTLS */ void SECUR32_initSchannelSP(void) {} +void SECUR32_deinitSchannelSP(void) {} #endif /* SONAME_LIBGNUTLS */ diff --git a/dlls/secur32/secur32.c b/dlls/secur32/secur32.c index 4a434ac..27e0263 100644 --- a/dlls/secur32/secur32.c +++ b/dlls/secur32/secur32.c @@ -673,6 +673,8 @@ static void SECUR32_freeProviders(void) TRACE("\n"); EnterCriticalSection(&cs); + SECUR32_deinitSchannelSP(); + if (packageTable) { LIST_FOR_EACH_ENTRY(package, &packageTable->table, SecurePackage, entry) diff --git a/dlls/secur32/secur32_priv.h b/dlls/secur32/secur32_priv.h index 6f9c1e7..9eed1a5 100644 --- a/dlls/secur32/secur32_priv.h +++ b/dlls/secur32/secur32_priv.h @@ -124,6 +124,9 @@ void SECUR32_initSchannelSP(void); void SECUR32_initNegotiateSP(void); void SECUR32_initNTLMSP(void); +/* Cleanup functions for built-in providers */ +void SECUR32_deinitSchannelSP(void); + /* Functions from dispatcher.c used elsewhere in the code */ SECURITY_STATUS fork_helper(PNegoHelper *new_helper, const char *prog, char * const argv[]);
1
0
0
0
Henri Verbeet : secur32: Basic implementation of schannel AcquireCredentialsHandle/ FreeCredentialsHandle.
by Alexandre Julliard
23 Sep '08
23 Sep '08
Module: wine Branch: master Commit: 7176dc261da2fef8742f5e8291d211ce18abbd6e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7176dc261da2fef8742f5e829…
Author: Henri Verbeet <hverbeet(a)gmail.com> Date: Mon Sep 22 22:14:04 2008 +0200 secur32: Basic implementation of schannel AcquireCredentialsHandle/FreeCredentialsHandle. All this does so far is create a handle and store the credential type in there. --- dlls/secur32/schannel.c | 139 ++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 136 insertions(+), 3 deletions(-) diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c index 67ce770..1633a70 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -32,6 +32,89 @@ WINE_DEFAULT_DEBUG_CHANNEL(secur32); #ifdef SONAME_LIBGNUTLS +enum schan_handle_type +{ + SCHAN_HANDLE_CRED, + SCHAN_HANDLE_FREE +}; + +struct schan_handle +{ + void *object; + enum schan_handle_type type; +}; + +struct schan_credentials +{ + ULONG credential_use; +}; + +static struct schan_handle *schan_handle_table; +static struct schan_handle *schan_free_handles; +static SIZE_T schan_handle_table_size; +static SIZE_T schan_handle_count; + +static ULONG_PTR schan_alloc_handle(void *object, enum schan_handle_type type) +{ + struct schan_handle *handle; + + if (schan_free_handles) + { + /* Use a free handle */ + handle = schan_free_handles; + if (handle->type != SCHAN_HANDLE_FREE) + { + ERR("Handle %d(%p) is in the free list, but has type %#x.\n", (handle-schan_handle_table), handle, handle->type); + return -1; + } + schan_free_handles = (struct schan_handle *)handle->object; + handle->object = object; + handle->type = type; + + return handle - schan_handle_table; + } + if (!(schan_handle_count < schan_handle_table_size)) + { + /* Grow the table */ + SIZE_T new_size = schan_handle_table_size + (schan_handle_table_size >> 1); + struct schan_handle *new_table = HeapReAlloc(GetProcessHeap(), 0, schan_handle_table, new_size * sizeof(*schan_handle_table)); + if (!new_table) + { + ERR("Failed to grow the handle table\n"); + return -1; + } + schan_handle_table = new_table; + schan_handle_table_size = new_size; + } + + handle = &schan_handle_table[schan_handle_count++]; + handle->object = object; + handle->type = type; + + return handle - schan_handle_table; +} + +static void *schan_free_handle(ULONG_PTR handle_idx, enum schan_handle_type type) +{ + struct schan_handle *handle; + void *object; + + if (handle_idx == -1) return NULL; + handle = &schan_handle_table[handle_idx]; + if (handle->type != type) + { + ERR("Handle %ld(%p) is not of type %#x\n", handle_idx, handle, type); + return NULL; + } + + object = handle->object; + handle->object = schan_free_handles; + handle->type = SCHAN_HANDLE_FREE; + schan_free_handles = handle; + + return object; +} + static SECURITY_STATUS schan_QueryCredentialsAttributes( PCredHandle phCredential, ULONG ulAttribute, const VOID *pBuffer) { @@ -162,6 +245,8 @@ static SECURITY_STATUS schan_AcquireClientCredentials(const SCHANNEL_CRED *schan { SECURITY_STATUS st = SEC_E_OK; + TRACE("schanCred %p, phCredential %p, ptsExpiry %p\n", schanCred, phCredential, ptsExpiry); + if (schanCred) { st = schan_CheckCreds(schanCred); @@ -174,7 +259,24 @@ static SECURITY_STATUS schan_AcquireClientCredentials(const SCHANNEL_CRED *schan */ if (st == SEC_E_OK) { - phCredential->dwUpper = SECPKG_CRED_OUTBOUND; + ULONG_PTR handle; + struct schan_credentials *creds; + + creds = HeapAlloc(GetProcessHeap(), 0, sizeof(*creds)); + if (!creds) return SEC_E_INSUFFICIENT_MEMORY; + + handle = schan_alloc_handle(creds, SCHAN_HANDLE_CRED); + if (handle == -1) + { + HeapFree(GetProcessHeap(), 0, creds); + return SEC_E_INTERNAL_ERROR; + } + + creds->credential_use = SECPKG_CRED_OUTBOUND; + + phCredential->dwLower = handle; + phCredential->dwUpper = 0; + /* Outbound credentials have no expiry */ if (ptsExpiry) { @@ -190,12 +292,30 @@ static SECURITY_STATUS schan_AcquireServerCredentials(const SCHANNEL_CRED *schan { SECURITY_STATUS st; + TRACE("schanCred %p, phCredential %p, ptsExpiry %p\n", schanCred, phCredential, ptsExpiry); + if (!schanCred) return SEC_E_NO_CREDENTIALS; st = schan_CheckCreds(schanCred); if (st == SEC_E_OK) { - phCredential->dwUpper = SECPKG_CRED_INBOUND; + ULONG_PTR handle; + struct schan_credentials *creds; + + creds = HeapAlloc(GetProcessHeap(), 0, sizeof(*creds)); + if (!creds) return SEC_E_INSUFFICIENT_MEMORY; + creds->credential_use = SECPKG_CRED_INBOUND; + + handle = schan_alloc_handle(creds, SCHAN_HANDLE_CRED); + if (handle == -1) + { + HeapFree(GetProcessHeap(), 0, creds); + return SEC_E_INTERNAL_ERROR; + } + + phCredential->dwLower = handle; + phCredential->dwUpper = 0; + /* FIXME: get expiry from cert */ } return st; @@ -242,7 +362,17 @@ static SECURITY_STATUS SEC_ENTRY schan_AcquireCredentialsHandleW( static SECURITY_STATUS SEC_ENTRY schan_FreeCredentialsHandle( PCredHandle phCredential) { - FIXME("(%p): stub\n", phCredential); + struct schan_credentials *creds; + + TRACE("phCredential %p\n", phCredential); + + if (!phCredential) return SEC_E_INVALID_HANDLE; + + creds = schan_free_handle(phCredential->dwLower, SCHAN_HANDLE_CRED); + if (!creds) return SEC_E_INVALID_HANDLE; + + HeapFree(GetProcessHeap(), 0, creds); + return SEC_E_OK; } @@ -397,6 +527,9 @@ void SECUR32_initSchannelSP(void) SECUR32_addPackages(provider, sizeof(info) / sizeof(info[0]), NULL, info); + + schan_handle_table = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 64 * sizeof(*schan_handle_table)); + schan_handle_table_size = 64; } }
1
0
0
0
Henri Verbeet : secur32: Require gnutls for schannel.
by Alexandre Julliard
23 Sep '08
23 Sep '08
Module: wine Branch: master Commit: 874c9ef6c735f8ac58a46557889028312140b1e9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=874c9ef6c735f8ac58a465578…
Author: Henri Verbeet <hverbeet(a)gmail.com> Date: Mon Sep 22 22:13:19 2008 +0200 secur32: Require gnutls for schannel. --- configure | 245 +++++++++++++++++++++++++++++++++++++++++++++- configure.ac | 16 +++ dlls/secur32/Makefile.in | 1 + dlls/secur32/schannel.c | 10 ++ include/config.h.in | 3 + 5 files changed, 274 insertions(+), 1 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=874c9ef6c735f8ac58a46…
1
0
0
0
Henri Verbeet : secur32: Skip schannel tests if schannel is unavailable.
by Alexandre Julliard
23 Sep '08
23 Sep '08
Module: wine Branch: master Commit: 4ac3fe7f897819e1fe3baa4629bdac5fcb8667e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4ac3fe7f897819e1fe3baa462…
Author: Henri Verbeet <hverbeet(a)gmail.com> Date: Mon Sep 22 22:13:18 2008 +0200 secur32: Skip schannel tests if schannel is unavailable. --- dlls/secur32/tests/schannel.c | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/dlls/secur32/tests/schannel.c b/dlls/secur32/tests/schannel.c index 9f7c2a8..a6032be 100644 --- a/dlls/secur32/tests/schannel.c +++ b/dlls/secur32/tests/schannel.c @@ -30,6 +30,8 @@ static HMODULE secdll, crypt32dll; static ACQUIRE_CREDENTIALS_HANDLE_FN_A pAcquireCredentialsHandleA; +static ENUMERATE_SECURITY_PACKAGES_FN_A pEnumerateSecurityPackagesA; +static FREE_CONTEXT_BUFFER_FN pFreeContextBuffer; static FREE_CREDENTIALS_HANDLE_FN pFreeCredentialsHandle; static QUERY_CREDENTIALS_ATTRIBUTES_FN_A pQueryCredentialsAttributesA; @@ -120,6 +122,8 @@ static void InitFunctionPtrs(void) if(secdll) { GET_PROC(secdll, AcquireCredentialsHandleA); + GET_PROC(secdll, EnumerateSecurityPackagesA); + GET_PROC(secdll, FreeContextBuffer); GET_PROC(secdll, FreeCredentialsHandle); GET_PROC(secdll, QueryCredentialsAttributesA); } @@ -150,6 +154,9 @@ static void test_strength(PCredHandle handle) static void testAcquireSecurityContext(void) { + BOOL has_schannel = FALSE; + SecPkgInfoA *package_info; + ULONG i; SECURITY_STATUS st; CredHandle cred; TimeStamp exp; @@ -163,12 +170,31 @@ static void testAcquireSecurityContext(void) CRYPT_KEY_PROV_INFO keyProvInfo; if (!pAcquireCredentialsHandleA || !pCertCreateCertificateContext || + !pEnumerateSecurityPackagesA || !pFreeContextBuffer || !pFreeCredentialsHandle || !pCryptAcquireContextW) { skip("Needed functions are not available\n"); return; } + if (SUCCEEDED(pEnumerateSecurityPackagesA(&i, &package_info))) + { + while(i--) + { + if (!strcmp(package_info[i].Name, unisp_name_a)) + { + has_schannel = TRUE; + break; + } + } + pFreeContextBuffer(package_info); + } + if (!has_schannel) + { + skip("Schannel not available\n"); + return; + } + lstrcpyW(ms_def_prov_w, MS_DEF_PROV_W); keyProvInfo.pwszContainerName = cspNameW;
1
0
0
0
Christian Costa : d3dxof: Implement IDirectXFileDataImpl_GetNextObject.
by Alexandre Julliard
23 Sep '08
23 Sep '08
Module: wine Branch: master Commit: 8002b790874c1f4dcf6d30a4dcc30661644bcaa9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8002b790874c1f4dcf6d30a4d…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Mon Sep 22 20:27:09 2008 +0200 d3dxof: Implement IDirectXFileDataImpl_GetNextObject. --- dlls/d3dxof/d3dxof.c | 47 ++++++++++++++++++++++++++++------------- dlls/d3dxof/d3dxof_private.h | 1 + 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c index eb0e5c2..d5a1569 100644 --- a/dlls/d3dxof/d3dxof.c +++ b/dlls/d3dxof/d3dxof.c @@ -161,7 +161,7 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV DWORD size; HANDLE hFile = INVALID_HANDLE_VALUE; - FIXME("(%p/%p)->(%p,%x,%p) partial stub!\n", This, iface, pvSource, dwLoadOptions, ppEnumObj); + TRACE("(%p/%p)->(%p,%x,%p)\n", This, iface, pvSource, dwLoadOptions, ppEnumObj); if (!ppEnumObj) return DXFILEERR_BADVALUE; @@ -1393,14 +1393,25 @@ static HRESULT WINAPI IDirectXFileDataImpl_GetType(IDirectXFileData* iface, cons static HRESULT WINAPI IDirectXFileDataImpl_GetNextObject(IDirectXFileData* iface, LPDIRECTXFILEOBJECT* ppChildObj) { + HRESULT hr; IDirectXFileDataImpl *This = (IDirectXFileDataImpl *)iface; + IDirectXFileDataImpl *object; - FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppChildObj); + TRACE("(%p/%p)->(%p)\n", This, iface, ppChildObj); if (This->cur_enum_object >= This->pobj->nb_childs) return DXFILEERR_NOMOREOBJECTS; - return DXFILEERR_BADVALUE; + hr = IDirectXFileDataImpl_Create(&object); + if (hr != S_OK) + return DXFILEERR_BADVALUE; + + object->pobj = This->pobj->childs[This->cur_enum_object++]; + object->cur_enum_object = 0; + + *ppChildObj = (LPDIRECTXFILEOBJECT)object; + + return DXFILE_OK; } static HRESULT WINAPI IDirectXFileDataImpl_AddDataObject(IDirectXFileData* iface, LPDIRECTXFILEDATA pDataObj) @@ -1751,6 +1762,8 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional) if (allow_optional) { + buf->pxo->size = buf->cur_pdata - buf->pxo->pdata; + /* Skip trailing semicolon */ while (check_TOKEN(buf) == TOKEN_SEMICOLON) get_TOKEN(buf); @@ -1767,6 +1780,9 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional) } else if (check_TOKEN(buf) == TOKEN_NAME) { + xobject* pxo = buf->pxo; + buf->pxo = buf->pxo->childs[buf->pxo->nb_childs] = &buf->pxo_tab[buf->cur_subobject++]; + TRACE("Enter optional %s\n", (char*)buf->value); buf->level++; if (!parse_object(buf)) @@ -1775,6 +1791,8 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional) return FALSE; } buf->level--; + buf->pxo = pxo; + buf->pxo->nb_childs++; } else break; @@ -1788,6 +1806,8 @@ static BOOL parse_object(parse_buffer * buf) { int i; + buf->pxo->pdata = buf->cur_pdata; + if (get_TOKEN(buf) != TOKEN_NAME) return FALSE; @@ -1849,10 +1869,9 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE IDirectXFileEnumObjectImpl *This = (IDirectXFileEnumObjectImpl *)iface; IDirectXFileDataImpl* object; HRESULT hr; + LPBYTE pdata; - FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppDataObj); - - /*printf("%d\n", This->buf.rem_bytes);*/ + TRACE("(%p/%p)->(%p)\n", This, iface, ppDataObj); if (!This->buf.rem_bytes) return DXFILEERR_NOMOREOBJECTS; @@ -1861,20 +1880,19 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE if (!SUCCEEDED(hr)) return hr; - This->buf.pxo = &This->xobjects[This->nb_xobjects][This->buf.cur_subobject]; - TRACE("Start %d %d\n", This->nb_xobjects, This->buf.cur_subobject); + This->buf.pxo_tab = &This->xobjects[This->nb_xobjects][0]; + This->buf.cur_subobject = 0; + This->buf.pxo = &This->buf.pxo_tab[This->buf.cur_subobject++]; - This->buf.pxo->pdata = HeapAlloc(GetProcessHeap(), 0, MAX_DATA_SIZE); - if (!This->buf.pxo->pdata) + pdata = HeapAlloc(GetProcessHeap(), 0, MAX_DATA_SIZE); + if (!pdata) { WARN("Out of memory\n"); return DXFILEERR_BADALLOC; } - This->buf.cur_pdata = This->buf.pxo->pdata; + This->buf.cur_pdata = pdata; This->buf.level = 0; - This->buf.pxo->pdata = This->buf.cur_pdata; - if (!parse_object(&This->buf)) { TRACE("Object is not correct\n"); @@ -1882,9 +1900,8 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE return DXFILEERR_PARSEERROR; } - This->buf.pxo->size = This->buf.cur_pdata - This->buf.pxo->pdata; - object->pobj = This->buf.pxo; + object->cur_enum_object = 0; *ppDataObj = (LPDIRECTXFILEDATA)object; diff --git a/dlls/d3dxof/d3dxof_private.h b/dlls/d3dxof/d3dxof_private.h index 5a77e56..14542f2 100644 --- a/dlls/d3dxof/d3dxof_private.h +++ b/dlls/d3dxof/d3dxof_private.h @@ -120,6 +120,7 @@ typedef struct { ULONG cur_subobject; LPBYTE cur_pdata; BYTE value[100]; + xobject* pxo_tab; IDirectXFileImpl* pdxf; xobject* pxo; xtemplate* pxt[MAX_SUBOBJECTS];
1
0
0
0
Erik Inge Bolsø : kernel32: Fix PROFILE_Load to handle mac line endings.
by Alexandre Julliard
23 Sep '08
23 Sep '08
Module: wine Branch: master Commit: e8754b8ea6facf5d72120eee227b2b51d226b32e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e8754b8ea6facf5d72120eee2…
Author: Erik Inge Bolsø <knan-wine(a)anduin.net> Date: Sun Sep 21 16:49:16 2008 +0200 kernel32: Fix PROFILE_Load to handle mac line endings. --- dlls/kernel32/profile.c | 1 + dlls/kernel32/tests/profile.c | 32 +++++++++++++++++++++----------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c index ab26533..3ed2dcd 100644 --- a/dlls/kernel32/profile.c +++ b/dlls/kernel32/profile.c @@ -405,6 +405,7 @@ static PROFILESECTION *PROFILE_Load(HANDLE hFile, ENCODING * pEncoding) { szLineStart = next_line; next_line = memchrW(szLineStart, '\n', szEnd - szLineStart); + if (!next_line) next_line = memchrW(szLineStart, '\r', szEnd - szLineStart); if (!next_line) next_line = szEnd; else next_line++; szLineEnd = next_line; diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index 8a3e83b..2a9f08a 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -428,7 +428,7 @@ static BOOL emptystr_ok(CHAR emptystr[MAX_PATH]) return TRUE; } -static void test_GetPrivateProfileString(void) +static void test_GetPrivateProfileString(const char *content, const char *descript) { DWORD ret; CHAR buf[MAX_PATH]; @@ -441,15 +441,10 @@ static void test_GetPrivateProfileString(void) LPSTR tempfile; static const char filename[] = ".\\winetest.ini"; - static const char content[]= - "[section1]\r\n" - "name1=val1\r\n" - "name2=\"val2\"\r\n" - "name3\r\n" - "name4=a\r\n" - "[section2]\r\n"; - create_test_file(filename, content, sizeof(content)); + trace("test_GetPrivateProfileStringA: %s\n", descript); + + create_test_file(filename, content, lstrlenA(content)); /* Run this test series with caching. Wine won't cache profile files younger than 2.1 seconds. */ @@ -674,7 +669,7 @@ static void test_GetPrivateProfileString(void) GetWindowsDirectoryA(windir, MAX_PATH); GetTempFileNameA(windir, "pre", 0, path); tempfile = strrchr(path, '\\') + 1; - create_test_file(path, content, sizeof(content)); + create_test_file(path, content, lstrlenA(content)); /* only filename is used, file exists in windows directory */ lstrcpyA(buf, "kumquat"); @@ -703,5 +698,20 @@ START_TEST(profile) test_profile_existing(); test_profile_delete_on_close(); test_profile_refresh(); - test_GetPrivateProfileString(); + test_GetPrivateProfileString( + "[section1]\r\n" + "name1=val1\r\n" + "name2=\"val2\"\r\n" + "name3\r\n" + "name4=a\r\n" + "[section2]\r\n", + "CR+LF"); + test_GetPrivateProfileString( + "[section1]\r" + "name1=val1\r" + "name2=\"val2\"\r" + "name3\r" + "name4=a\r" + "[section2]\r", + "CR only"); }
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
122
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Results per page:
10
25
50
100
200