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
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
July 2014
----- 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
2 participants
287 discussions
Start a n
N
ew thread
Ken Thomases : dbghelp: If the caller didn' t provide a module load address use the segment start address.
by Alexandre Julliard
07 Jul '14
07 Jul '14
Module: wine Branch: master Commit: 1f2680f5f39f14c3160d689a5237e365334938d5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1f2680f5f39f14c3160d689a5…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Mon Jul 7 15:35:44 2014 -0500 dbghelp: If the caller didn't provide a module load address use the segment start address. --- dlls/dbghelp/macho_module.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c index c6270c8..ebea4fd 100644 --- a/dlls/dbghelp/macho_module.c +++ b/dlls/dbghelp/macho_module.c @@ -1020,6 +1020,8 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename, struct module_format* modfmt = HeapAlloc(GetProcessHeap(), 0, sizeof(struct module_format) + sizeof(struct macho_module_info)); if (!modfmt) goto leave; + if (!load_addr) + load_addr = fmap.segs_start; macho_info->module = module_new(pcs, filename, DMT_MACHO, FALSE, load_addr, fmap.segs_size, 0, calc_crc32(fmap.fd)); if (!macho_info->module)
1
0
0
0
Stefan Dösinger : ddraw: Refuse SetPalette and GetPalette on lost surfaces.
by Alexandre Julliard
07 Jul '14
07 Jul '14
Module: wine Branch: master Commit: 403d7c1dee11959dfaa781a14ed6f4c8fae90292 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=403d7c1dee11959dfaa781a14…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Sun Jul 6 18:06:43 2014 +0200 ddraw: Refuse SetPalette and GetPalette on lost surfaces. The SetPalette check is outside of ddraw_surface_set_palette to make sure the palettes are properly freed when a lost P8 surface is destroyed. --- dlls/ddraw/surface.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index e0fdf81..3d61e61 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -4515,6 +4515,11 @@ static HRESULT WINAPI ddraw_surface7_GetPalette(IDirectDrawSurface7 *iface, IDir if (!palette) return DDERR_INVALIDPARAMS; + if (IDirectDrawSurface7_IsLost(iface) == DDERR_SURFACELOST) + { + WARN("Surface lost, returning DDERR_SURFACELOST.\n"); + return DDERR_SURFACELOST; + } wined3d_mutex_lock(); if ((palette_impl = surface->palette)) @@ -4705,6 +4710,11 @@ static HRESULT WINAPI ddraw_surface7_SetPalette(IDirectDrawSurface7 *iface, IDir if (surface->surface_desc.ddsCaps.dwCaps2 & DDSCAPS2_MIPMAPSUBLEVEL) return DDERR_NOTONMIPMAPSUBLEVEL; + if (IDirectDrawSurface7_IsLost(iface) == DDERR_SURFACELOST) + { + WARN("Surface lost, returning DDERR_SURFACELOST.\n"); + return DDERR_SURFACELOST; + } return ddraw_surface_set_palette(surface, palette); } @@ -4715,6 +4725,12 @@ static HRESULT WINAPI ddraw_surface4_SetPalette(IDirectDrawSurface4 *iface, IDir TRACE("iface %p, palette %p.\n", iface, palette); + if (IDirectDrawSurface4_IsLost(iface) == DDERR_SURFACELOST) + { + WARN("Surface lost, returning DDERR_SURFACELOST.\n"); + return DDERR_SURFACELOST; + } + return ddraw_surface_set_palette(surface, palette); } @@ -4724,6 +4740,12 @@ static HRESULT WINAPI ddraw_surface3_SetPalette(IDirectDrawSurface3 *iface, IDir TRACE("iface %p, palette %p.\n", iface, palette); + if (IDirectDrawSurface3_IsLost(iface) == DDERR_SURFACELOST) + { + WARN("Surface lost, returning DDERR_SURFACELOST.\n"); + return DDERR_SURFACELOST; + } + return ddraw_surface_set_palette(surface, palette); } @@ -4733,6 +4755,12 @@ static HRESULT WINAPI ddraw_surface2_SetPalette(IDirectDrawSurface2 *iface, IDir TRACE("iface %p, palette %p.\n", iface, palette); + if (IDirectDrawSurface2_IsLost(iface) == DDERR_SURFACELOST) + { + WARN("Surface lost, returning DDERR_SURFACELOST.\n"); + return DDERR_SURFACELOST; + } + return ddraw_surface_set_palette(surface, palette); } @@ -4742,6 +4770,12 @@ static HRESULT WINAPI ddraw_surface1_SetPalette(IDirectDrawSurface *iface, IDire TRACE("iface %p, palette %p.\n", iface, palette); + if (IDirectDrawSurface_IsLost(iface) == DDERR_SURFACELOST) + { + WARN("Surface lost, returning DDERR_SURFACELOST.\n"); + return DDERR_SURFACELOST; + } + return ddraw_surface_set_palette(surface, palette); }
1
0
0
0
Stefan Dösinger : wined3d: Do not write a FIXME about WINED3DUSAGE_WRITEONLY.
by Alexandre Julliard
07 Jul '14
07 Jul '14
Module: wine Branch: master Commit: 4b88d51bc9ce7c41c01a2c046f7b412eace5f380 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4b88d51bc9ce7c41c01a2c046…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Sun Jul 6 18:06:42 2014 +0200 wined3d: Do not write a FIXME about WINED3DUSAGE_WRITEONLY. --- dlls/wined3d/resource.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index 999dc5c..3a54dd8 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -26,6 +26,7 @@ #include "wined3d_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3d); +WINE_DECLARE_DEBUG_CHANNEL(d3d_perf); static DWORD resource_access_from_pool(enum wined3d_pool pool) { @@ -51,6 +52,7 @@ static void resource_check_usage(DWORD usage) { static const DWORD handled = WINED3DUSAGE_RENDERTARGET | WINED3DUSAGE_DEPTHSTENCIL + | WINED3DUSAGE_WRITEONLY | WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_AUTOGENMIPMAP | WINED3DUSAGE_STATICDECL @@ -59,6 +61,8 @@ static void resource_check_usage(DWORD usage) if (usage & ~handled) FIXME("Unhandled usage flags %#x.\n", usage & ~handled); + if ((usage & (WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY)) == WINED3DUSAGE_DYNAMIC) + WARN_(d3d_perf)("WINED3DUSAGE_DYNAMIC used without WINED3DUSAGE_WRITEONLY.\n"); } HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device,
1
0
0
0
Bruno Jesus : dnsapi: Do not fail if NETDB_INTERNAL is not present.
by Alexandre Julliard
07 Jul '14
07 Jul '14
Module: wine Branch: master Commit: 836e6690d456c0f5e095be42a8ed15252160ff51 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=836e6690d456c0f5e095be42a…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Sun Jul 6 22:22:18 2014 -0300 dnsapi: Do not fail if NETDB_INTERNAL is not present. --- dlls/dnsapi/query.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/dnsapi/query.c b/dlls/dnsapi/query.c index 578239e..e05205b 100644 --- a/dlls/dnsapi/query.c +++ b/dlls/dnsapi/query.c @@ -147,7 +147,9 @@ static DNS_STATUS dns_map_h_errno( int error ) case HOST_NOT_FOUND: return DNS_ERROR_RCODE_NAME_ERROR; case TRY_AGAIN: return DNS_ERROR_RCODE_SERVER_FAILURE; case NO_RECOVERY: return DNS_ERROR_RCODE_REFUSED; +#ifdef NETDB_INTERNAL case NETDB_INTERNAL: return DNS_ERROR_RCODE; +#endif default: FIXME( "unmapped error code: %d\n", error ); return DNS_ERROR_RCODE_NOT_IMPLEMENTED;
1
0
0
0
Francois Gouget : shlwapi/tests: Make test_PathIsRelative[AW]() static.
by Alexandre Julliard
07 Jul '14
07 Jul '14
Module: wine Branch: master Commit: ece6f5c3e00fc3834fe9944cb370e9b972446cda URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ece6f5c3e00fc3834fe9944cb…
Author: Francois Gouget <fgouget(a)free.fr> Date: Sat Jul 5 11:15:09 2014 +0200 shlwapi/tests: Make test_PathIsRelative[AW]() static. --- dlls/shlwapi/tests/path.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/shlwapi/tests/path.c b/dlls/shlwapi/tests/path.c index 9fe70cd..1599313 100644 --- a/dlls/shlwapi/tests/path.c +++ b/dlls/shlwapi/tests/path.c @@ -1600,7 +1600,7 @@ static const struct { {"file:///C:/test.txt", TRUE} }; -void test_PathIsRelativeA(void) +static void test_PathIsRelativeA(void) { BOOL ret; int i, num; @@ -1619,7 +1619,7 @@ void test_PathIsRelativeA(void) } } -void test_PathIsRelativeW(void) +static void test_PathIsRelativeW(void) { BOOL ret; int i, num;
1
0
0
0
Erich E. Hoover : advapi32: Implement RegSetKeySecurity on top of NtSetSecurityObject.
by Alexandre Julliard
04 Jul '14
04 Jul '14
Module: wine Branch: master Commit: f9f3b21fb3a8b8266fa25ae7acb6790195b78f83 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f9f3b21fb3a8b8266fa25ae7a…
Author: Erich E. Hoover <erich.e.hoover(a)gmail.com> Date: Fri Jul 4 10:10:45 2014 -0600 advapi32: Implement RegSetKeySecurity on top of NtSetSecurityObject. --- dlls/advapi32/registry.c | 4 ++-- dlls/advapi32/tests/registry.c | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c index d568ae0..bb68b3d 100644 --- a/dlls/advapi32/registry.c +++ b/dlls/advapi32/registry.c @@ -2488,9 +2488,9 @@ LSTATUS WINAPI RegSetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInfo, if (!pSecurityDesc) return ERROR_INVALID_PARAMETER; - FIXME(":(%p,%d,%p): stub\n",hkey,SecurityInfo,pSecurityDesc); + if (!(hkey = get_special_root_hkey( hkey, 0 ))) return ERROR_INVALID_HANDLE; - return ERROR_SUCCESS; + return RtlNtStatusToDosError( NtSetSecurityObject( hkey, SecurityInfo, pSecurityDesc ) ); } diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 0626aff..85f50ce 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -1103,14 +1103,15 @@ static void test_reg_open_key(void) } else { - /* The "sanctioned" methods of setting a registry ACL aren't implemented in Wine. */ - bRet = SetKernelObjectSecurity(hkRoot64, DACL_SECURITY_INFORMATION, sd); - ok(bRet == TRUE, - "Expected SetKernelObjectSecurity to return TRUE, got %d, last error %u\n", bRet, GetLastError()); + LONG error; - bRet = SetKernelObjectSecurity(hkRoot32, DACL_SECURITY_INFORMATION, sd); - ok(bRet == TRUE, - "Expected SetKernelObjectSecurity to return TRUE, got %d, last error %u\n", bRet, GetLastError()); + error = RegSetKeySecurity(hkRoot64, DACL_SECURITY_INFORMATION, sd); + ok(error == ERROR_SUCCESS, + "Expected RegSetKeySecurity to return success, got error %u\n", error); + + bRet = RegSetKeySecurity(hkRoot32, DACL_SECURITY_INFORMATION, sd); + ok(error == ERROR_SUCCESS, + "Expected RegSetKeySecurity to return success, got error %u\n", error); hkResult = NULL; ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine", 0, KEY_WOW64_64KEY | KEY_READ, &hkResult); @@ -1264,14 +1265,13 @@ static void test_reg_create_key(void) } else { - /* The "sanctioned" methods of setting a registry ACL aren't implemented in Wine. */ - bRet = SetKernelObjectSecurity(hkRoot64, DACL_SECURITY_INFORMATION, sd); - ok(bRet == TRUE, - "Expected SetKernelObjectSecurity to return TRUE, got %d, last error %u\n", bRet, GetLastError()); - - bRet = SetKernelObjectSecurity(hkRoot32, DACL_SECURITY_INFORMATION, sd); - ok(bRet == TRUE, - "Expected SetKernelObjectSecurity to return TRUE, got %d, last error %u\n", bRet, GetLastError()); + ret = RegSetKeySecurity(hkRoot64, DACL_SECURITY_INFORMATION, sd); + ok(ret == ERROR_SUCCESS, + "Expected RegSetKeySecurity to return success, got error %u\n", ret); + + ret = RegSetKeySecurity(hkRoot32, DACL_SECURITY_INFORMATION, sd); + ok(ret == ERROR_SUCCESS, + "Expected RegSetKeySecurity to return success, got error %u\n", ret); hkey1 = NULL; ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0,
1
0
0
0
Akihiro Sagawa : winmm: Fallback to SND_FILENAME if the alias isn' t found in the profile.
by Alexandre Julliard
04 Jul '14
04 Jul '14
Module: wine Branch: master Commit: 113a2abbc8257fc4d83682c5c5fe4f344569806f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=113a2abbc8257fc4d83682c5c…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Sat Jul 5 00:37:12 2014 +0900 winmm: Fallback to SND_FILENAME if the alias isn't found in the profile. --- dlls/winmm/playsound.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/winmm/playsound.c b/dlls/winmm/playsound.c index 64db333..f8bd91f 100644 --- a/dlls/winmm/playsound.c +++ b/dlls/winmm/playsound.c @@ -338,6 +338,11 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) else goto errCleanUp; } hmmio = get_mmioFromProfile(wps->fdwSound, wps->pszSound); + if (!hmmio) + { + wps->fdwSound &= ~SND_ALIAS; + wps->fdwSound |= SND_FILENAME; + } } if (!hmmio && wps->fdwSound & SND_FILENAME) {
1
0
0
0
Jactry Zeng : riched20: Return nonzero value instead of zero when EM_SETREADONLY succeeds.
by Alexandre Julliard
04 Jul '14
04 Jul '14
Module: wine Branch: master Commit: 455eca6d228a4850214345be2cccc665bece5a0e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=455eca6d228a4850214345be2…
Author: Jactry Zeng <wine(a)jactry.com> Date: Fri Jul 4 22:51:35 2014 +0800 riched20: Return nonzero value instead of zero when EM_SETREADONLY succeeds. --- dlls/riched20/editor.c | 2 +- dlls/riched20/tests/editor.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index f0d6590..43d74ec 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3479,7 +3479,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, editor->styleFlags |= ES_READONLY; else editor->styleFlags &= ~ES_READONLY; - return 0; + return 1; } case EM_SETEVENTMASK: { diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 5421614..3bd3ec0 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -7576,6 +7576,25 @@ static void test_reset_default_para_fmt( void ) DestroyWindow( richedit ); } +static void test_EM_SETREADONLY(void) +{ + HWND richedit = new_richeditW(NULL); + DWORD dwStyle; + LRESULT res; + + res = SendMessageA(richedit, EM_SETREADONLY, TRUE, 0); + ok(res == 1, "EM_SETREADONLY\n"); + dwStyle = GetWindowLongA(richedit, GWL_STYLE); + ok(dwStyle & ES_READONLY, "got wrong value: 0x%x\n", dwStyle & ES_READONLY); + + res = SendMessageA(richedit, EM_SETREADONLY, FALSE, 0); + ok(res == 1, "EM_SETREADONLY\n"); + dwStyle = GetWindowLongA(richedit, GWL_STYLE); + ok(!(dwStyle & ES_READONLY), "got wrong value: 0x%x\n", dwStyle & ES_READONLY); + + DestroyWindow(richedit); +} + START_TEST( editor ) { BOOL ret; @@ -7639,6 +7658,7 @@ START_TEST( editor ) test_enter(); test_WM_CREATE(); test_reset_default_para_fmt(); + test_EM_SETREADONLY(); /* Set the environment variable WINETEST_RICHED20 to keep windows * responsive and open for 30 seconds. This is useful for debugging.
1
0
0
0
Jacek Caban : wininet/tests: Added INTERNET_COOKIE_HTTPONLY tests.
by Alexandre Julliard
04 Jul '14
04 Jul '14
Module: wine Branch: master Commit: b4ce0760e5e65f06b91c5afacd12470e1e2c2849 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b4ce0760e5e65f06b91c5afac…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jul 4 14:45:40 2014 +0200 wininet/tests: Added INTERNET_COOKIE_HTTPONLY tests. --- dlls/wininet/tests/internet.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index e2ad17a..17e16ab 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -557,6 +557,46 @@ static void test_complicated_cookie(void) todo_wine ok(!ret, "InternetSetCookie succeeded\n"); } +static void test_cookie_attrs(void) +{ + char buf[100]; + DWORD size, state; + BOOL ret; + + if(!GetProcAddress(GetModuleHandleA("wininet.dll"), "InternetGetSecurityInfoByURLA")) { + win_skip("Skipping cookie attributes tests. Too old IE.\n"); + return; + } + + ret = InternetSetCookieA("
http://cookie.attrs.com/bar
", NULL, "A=data; httponly"); + ok(!ret && GetLastError() == ERROR_INVALID_OPERATION, "InternetSetCookie returned: %x (%u)\n", ret, GetLastError()); + + SetLastError(0xdeadbeef); + state = InternetSetCookieExA("
http://cookie.attrs.com/bar
", NULL, "A=data; httponly", 0, 0); + ok(state == COOKIE_STATE_REJECT && GetLastError() == ERROR_INVALID_OPERATION, + "InternetSetCookieEx returned: %x (%u)\n", ret, GetLastError()); + + size = sizeof(buf); + ret = InternetGetCookieExA("
http://cookie.attrs.com/
", NULL, buf, &size, INTERNET_COOKIE_HTTPONLY, NULL); + ok(!ret && GetLastError() == ERROR_NO_MORE_ITEMS, "InternetGetCookieEx returned: %x (%u)\n", ret, GetLastError()); + + state = InternetSetCookieExA("
http://cookie.attrs.com/bar
",NULL,"A=data; httponly", INTERNET_COOKIE_HTTPONLY, 0); + ok(state == COOKIE_STATE_ACCEPT,"InternetSetCookieEx failed: %u\n", GetLastError()); + + size = sizeof(buf); + ret = InternetGetCookieA("
http://cookie.attrs.com/
", NULL, buf, &size); + ok(!ret && GetLastError() == ERROR_NO_MORE_ITEMS, "InternetGetCookie returned: %x (%u)\n", ret, GetLastError()); + + size = sizeof(buf); + ret = InternetGetCookieExA("
http://cookie.attrs.com/
", NULL, buf, &size, 0, NULL); + ok(!ret && GetLastError() == ERROR_NO_MORE_ITEMS, "InternetGetCookieEx returned: %x (%u)\n", ret, GetLastError()); + + size = sizeof(buf); + ret = InternetGetCookieExA("
http://cookie.attrs.com/
", NULL, buf, &size, INTERNET_COOKIE_HTTPONLY, NULL); + ok(ret, "InternetGetCookieEx failed: %u\n", GetLastError()); + ok(!strcmp(buf, "A=data"), "data = %s\n", buf); +} + static void test_cookie_url(void) { WCHAR bufw[512]; @@ -1618,6 +1658,7 @@ START_TEST(internet) test_get_cookie(); test_complicated_cookie(); test_cookie_url(); + test_cookie_attrs(); test_version(); test_null(); test_Option_PerConnectionOption();
1
0
0
0
Jacek Caban : wininet: Added support for INTERNET_COOKIE_HTTPONLY flag to InternetGetCookieEx.
by Alexandre Julliard
04 Jul '14
04 Jul '14
Module: wine Branch: master Commit: db441cf58f03396315fb8ae507c1f6fd3a1ed742 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=db441cf58f03396315fb8ae50…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jul 4 14:45:34 2014 +0200 wininet: Added support for INTERNET_COOKIE_HTTPONLY flag to InternetGetCookieEx. --- dlls/wininet/cookie.c | 7 +++++-- dlls/wininet/http.c | 4 ++-- dlls/wininet/internet.h | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dlls/wininet/cookie.c b/dlls/wininet/cookie.c index 36e0f60..0af8c38 100644 --- a/dlls/wininet/cookie.c +++ b/dlls/wininet/cookie.c @@ -531,7 +531,7 @@ static void COOKIE_deleteDomain(cookie_domain *deadDomain) heap_free(deadDomain); } -DWORD get_cookie(const WCHAR *host, const WCHAR *path, WCHAR *cookie_data, DWORD *size) +DWORD get_cookie(const WCHAR *host, const WCHAR *path, WCHAR *cookie_data, DWORD *size, DWORD flags) { static const WCHAR empty_path[] = { '/',0 }; @@ -590,6 +590,9 @@ DWORD get_cookie(const WCHAR *host, const WCHAR *path, WCHAR *cookie_data, DWORD continue; } + if((cookie_iter->flags & INTERNET_COOKIE_HTTPONLY) && !(flags & INTERNET_COOKIE_HTTPONLY)) + continue; + if (cookie_count) cnt += 2; /* '; ' */ cnt += name_len = strlenW(cookie_iter->lpCookieName); @@ -686,7 +689,7 @@ BOOL WINAPI InternetGetCookieExW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName, return FALSE; } - res = get_cookie(host, path, lpCookieData, lpdwSize); + res = get_cookie(host, path, lpCookieData, lpdwSize, flags); if(res != ERROR_SUCCESS) SetLastError(res); return res == ERROR_SUCCESS; diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index af57d9e..ffd31e6 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -4186,7 +4186,7 @@ static void HTTP_InsertCookies(http_request_t *request) if(!host) return; - if(get_cookie(host->lpszValue, request->path, NULL, &cookie_size) != ERROR_SUCCESS) + if(get_cookie(host->lpszValue, request->path, NULL, &cookie_size, INTERNET_COOKIE_HTTPONLY) != ERROR_SUCCESS) return; size = sizeof(cookieW) + cookie_size * sizeof(WCHAR) + sizeof(szCrLf); @@ -4194,7 +4194,7 @@ static void HTTP_InsertCookies(http_request_t *request) return; cnt += sprintfW(cookies, cookieW); - get_cookie(host->lpszValue, request->path, cookies+cnt, &cookie_size); + get_cookie(host->lpszValue, request->path, cookies+cnt, &cookie_size, INTERNET_COOKIE_HTTPONLY); strcatW(cookies, szCrLf); HTTP_HttpAddRequestHeadersW(request, cookies, strlenW(cookies), HTTP_ADDREQ_FLAG_REPLACE); diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index 233c40c..2647f98 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -420,7 +420,7 @@ DWORD HTTP_Connect(appinfo_t*,LPCWSTR, BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort, struct sockaddr *psa, socklen_t *sa_len) DECLSPEC_HIDDEN; -DWORD get_cookie(const WCHAR*,const WCHAR*,WCHAR*,DWORD*) DECLSPEC_HIDDEN; +DWORD get_cookie(const WCHAR*,const WCHAR*,WCHAR*,DWORD*,DWORD) DECLSPEC_HIDDEN; DWORD set_cookie(const WCHAR*,const WCHAR*,const WCHAR*,const WCHAR*,DWORD) DECLSPEC_HIDDEN; void INTERNET_SetLastError(DWORD dwError) DECLSPEC_HIDDEN;
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
29
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
Results per page:
10
25
50
100
200