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 2020
----- 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
1 participants
826 discussions
Start a n
N
ew thread
Zhiyi Zhang : wined3d: Call wined3d_adapter_init() before initialising any adapter field.
by Alexandre Julliard
08 Jul '20
08 Jul '20
Module: wine Branch: master Commit: 597433ab6bb0263ed5e1f68b5cffe9fb5a4a16cd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=597433ab6bb0263ed5e1f68b…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Wed Jul 8 15:57:51 2020 +0800 wined3d: Call wined3d_adapter_init() before initialising any adapter field. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/directx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 456cb9ad12..b5de589d33 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2914,10 +2914,6 @@ static struct wined3d_adapter *wined3d_adapter_no3d_create(unsigned int ordinal, if (!(adapter = heap_alloc_zero(sizeof(*adapter)))) return NULL; - wined3d_driver_info_init(&adapter->driver_info, &gpu_description, 0, 0); - adapter->vram_bytes_used = 0; - TRACE("Emulating 0x%s bytes of video ram.\n", wine_dbgstr_longlong(adapter->driver_info.vram_bytes)); - if (!wined3d_adapter_init(adapter, ordinal, &wined3d_adapter_no3d_ops)) { heap_free(adapter); @@ -2930,6 +2926,10 @@ static struct wined3d_adapter *wined3d_adapter_no3d_create(unsigned int ordinal, return NULL; } + wined3d_driver_info_init(&adapter->driver_info, &gpu_description, 0, 0); + adapter->vram_bytes_used = 0; + TRACE("Emulating 0x%s bytes of video ram.\n", wine_dbgstr_longlong(adapter->driver_info.vram_bytes)); + adapter->vertex_pipe = &none_vertex_pipe; adapter->fragment_pipe = &none_fragment_pipe; adapter->misc_state_template = misc_state_template_no3d;
1
0
0
0
Gijs Vermeulen : wbemprox/tests: Add Win32_SoundDevice tests.
by Alexandre Julliard
08 Jul '20
08 Jul '20
Module: wine Branch: master Commit: d16a353700088549af8c06894eda3129e16d867c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d16a353700088549af8c0689…
Author: Gijs Vermeulen <gijsvrm(a)gmail.com> Date: Wed Jul 8 12:26:02 2020 +0200 wbemprox/tests: Add Win32_SoundDevice tests. Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/tests/query.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c index 7dcfd35e93..da47773da2 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -1551,6 +1551,35 @@ static void test_Win32_QuickFixEngineering( IWbemServices *services ) SysFreeString( wql ); } +static void test_Win32_SoundDevice( IWbemServices *services ) +{ + BSTR wql = SysAllocString( L"wql" ); + BSTR query = SysAllocString( L"SELECT * FROM Win32_SoundDevice" ); + IEnumWbemClassObject *result; + IWbemClassObject *obj; + HRESULT hr; + DWORD count; + + hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result ); + ok( hr == S_OK, "got %08x\n", hr ); + + for (;;) + { + hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count ); + if (hr != S_OK) break; + + check_property( obj, L"Name", VT_BSTR, CIM_STRING ); + check_property( obj, L"ProductName", VT_BSTR, CIM_STRING ); + check_property( obj, L"StatusInfo", VT_I4, CIM_UINT16 ); + check_property( obj, L"Manufacturer", VT_BSTR, CIM_STRING ); + IWbemClassObject_Release( obj ); + } + + IEnumWbemClassObject_Release( result ); + SysFreeString( query ); + SysFreeString( wql ); +} + START_TEST(query) { BSTR path = SysAllocString( L"ROOT\\CIMV2" ); @@ -1602,6 +1631,7 @@ START_TEST(query) test_Win32_Processor( services ); test_Win32_QuickFixEngineering( services ); test_Win32_Service( services ); + test_Win32_SoundDevice( services ); test_Win32_SystemEnclosure( services ); test_Win32_VideoController( services ); test_Win32_WinSAT( services );
1
0
0
0
Esme Povirk : wbemprox: Implement Win32_SoundDevice.Manufacturer.
by Alexandre Julliard
08 Jul '20
08 Jul '20
Module: wine Branch: master Commit: 2ea3e40465f0530ad71c31e77c9727c00673d91f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2ea3e40465f0530ad71c31e7…
Author: Esme Povirk <esme(a)codeweavers.com> Date: Wed Jul 8 12:26:01 2020 +0200 wbemprox: Implement Win32_SoundDevice.Manufacturer. Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/builtin.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index a94d41bfc4..f055547a6b 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -376,9 +376,10 @@ static const struct column col_sid[] = }; static const struct column col_sounddevice[] = { - { L"Name", CIM_STRING }, - { L"ProductName", CIM_STRING }, - { L"StatusInfo", CIM_UINT16 }, + { L"Manufacturer", CIM_STRING }, + { L"Name", CIM_STRING }, + { L"ProductName", CIM_STRING }, + { L"StatusInfo", CIM_UINT16 }, }; static const struct column col_stdregprov[] = { @@ -764,6 +765,7 @@ struct record_sid }; struct record_sounddevice { + const WCHAR *manufacturer; const WCHAR *name; const WCHAR *productname; UINT16 statusinfo; @@ -884,7 +886,7 @@ static const struct record_quickfixengineering data_quickfixengineering[] = }; static const struct record_sounddevice data_sounddevice[] = { - { L"Wine Audio Device", L"Wine Audio Device", 3 /* enabled */ } + { L"The Wine Project", L"Wine Audio Device", L"Wine Audio Device", 3 /* enabled */ } }; static const struct record_stdregprov data_stdregprov[] = {
1
0
0
0
Daniel Lehman : msxml3: Set internal error on loading from IPersistStream.
by Alexandre Julliard
08 Jul '20
08 Jul '20
Module: wine Branch: master Commit: da3893fe48ed458388afa7f520b97b267d25844e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=da3893fe48ed458388afa7f5…
Author: Daniel Lehman <dlehman25(a)gmail.com> Date: Tue Jun 23 21:28:18 2020 -0700 msxml3: Set internal error on loading from IPersistStream. Signed-off-by: Daniel Lehman <dlehman25(a)gmail.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msxml3/domdoc.c | 2 +- dlls/msxml3/tests/domdoc.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index c86a4931c5..b740b2e9d3 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -824,7 +824,7 @@ static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, IStream if (!stream) return E_INVALIDARG; - return domdoc_load_from_stream(This, (ISequentialStream*)stream); + return This->error = domdoc_load_from_stream(This, (ISequentialStream*)stream); } static HRESULT WINAPI PersistStreamInit_Save( diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 0ebc5165a3..ef29bf6a59 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -2181,6 +2181,7 @@ static void test_persiststream(void) IXMLDOMDocument *doc; ULARGE_INTEGER size; IPersist *persist; + IStream *istream; HRESULT hr; CLSID clsid; @@ -2214,6 +2215,21 @@ static void test_persiststream(void) ok(IsEqualGUID(&clsid, &CLSID_DOMDocument2), "wrong clsid %s\n", wine_dbgstr_guid(&clsid)); IPersistStream_Release(stream); + + /* test Load */ + istream = SHCreateMemStream((const BYTE*)complete4A, strlen(complete4A)); + hr = IPersistStreamInit_Load(streaminit, istream); + ok(hr == S_OK, "got 0x%08x\n", hr); + IStream_Release(istream); + EXPECT_PARSE_ERROR(doc, S_OK, FALSE); + + istream = SHCreateMemStream((const BYTE*)"", 0); + hr = IPersistStreamInit_Load(streaminit, istream); + todo_wine ok(hr == XML_E_MISSINGROOT, "got 0x%08x\n", hr); + ok(FAILED(hr), "got success\n"); + IStream_Release(istream); + EXPECT_PARSE_ERROR(doc, XML_E_MISSINGROOT, TRUE); + IPersistStreamInit_Release(streaminit); IXMLDOMDocument_Release(doc); }
1
0
0
0
Daniel Lehman : msxml3: Set internal error on loading from IStream.
by Alexandre Julliard
08 Jul '20
08 Jul '20
Module: wine Branch: master Commit: 50650c26fe8412a8b0de68edfce6e8e6e332dd81 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=50650c26fe8412a8b0de68ed…
Author: Daniel Lehman <dlehman25(a)gmail.com> Date: Tue Jun 23 21:28:17 2020 -0700 msxml3: Set internal error on loading from IStream. Signed-off-by: Daniel Lehman <dlehman25(a)gmail.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msxml3/domdoc.c | 2 +- dlls/msxml3/tests/Makefile.in | 2 +- dlls/msxml3/tests/domdoc.c | 56 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index 76d3fdb601..c86a4931c5 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -2276,7 +2276,7 @@ static HRESULT WINAPI domdoc_load( if (hr == S_OK) { - hr = domdoc_load_from_stream(This, stream); + hr = This->error = domdoc_load_from_stream(This, stream); if (hr == S_OK) *isSuccessful = VARIANT_TRUE; ISequentialStream_Release(stream); diff --git a/dlls/msxml3/tests/Makefile.in b/dlls/msxml3/tests/Makefile.in index c397295142..bc1f051b09 100644 --- a/dlls/msxml3/tests/Makefile.in +++ b/dlls/msxml3/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = msxml3.dll -IMPORTS = oleaut32 ole32 user32 +IMPORTS = oleaut32 ole32 user32 shlwapi C_SRCS = \ domdoc.c \ diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 49768b8dbe..0ebc5165a3 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -37,8 +37,10 @@ #include "dispex.h" #include "objsafe.h" #include "mshtml.h" +#include "xmlparser.h" #include "initguid.h" #include "asptlb.h" +#include "shlwapi.h" #include "wine/heap.h" #include "wine/test.h" @@ -700,6 +702,36 @@ static void _expect_list_len(IXMLDOMNodeList *list, LONG len, int line) #define EXPECT_HR(hr,hr_exp) \ ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp) +#define EXPECT_PARSE_ERROR(doc, hr_exp, hr_todo) _expect_parse_error(doc, hr_exp, hr_todo, __LINE__) +static void _expect_parse_error(IXMLDOMDocument *doc, HRESULT hr_exp, BOOL hr_todo, int line) +{ + IXMLDOMParseError *error; + HRESULT hr; + LONG code; + + error = NULL; + hr = IXMLDOMDocument_get_parseError(doc, &error); + ok_(__FILE__,line)(hr == S_OK, "got 0x%08x\n", hr); + ok_(__FILE__,line)(!!error, "got NULL parseError\n"); + + code = 0xdeadbeef; + hr = IXMLDOMParseError_get_errorCode(error, &code); + if (FAILED(hr_exp)) + { + ok_(__FILE__,line)(hr == S_OK, "got 0x%08x\n", hr); + ok_(__FILE__,line)(FAILED(code), "expected failure HRESULT\n"); + todo_wine_if(hr_todo) + ok_(__FILE__,line)(hr_exp == code, "expected 0x%08x, got 0x%08x\n", hr_exp, code); + } + else + { + ok_(__FILE__,line)(hr == S_FALSE, "got 0x%08x\n", hr); + ok_(__FILE__,line)(SUCCEEDED(code), "expected successful HRESULT\n"); + } + + IXMLDOMParseError_Release(error); +} + static const WCHAR szEmpty[] = { 0 }; static const WCHAR szIncomplete[] = { '<','?','x','m','l',' ', @@ -10242,6 +10274,7 @@ static void test_load(void) IXMLDOMNodeList *list; IXMLDOMDocument *doc; BSTR bstr1, bstr2; + IStream *stream; VARIANT_BOOL b; VARIANT src; HRESULT hr; @@ -10419,6 +10452,29 @@ static void test_load(void) ok(b == VARIANT_FALSE, "got %d\n", b); VariantClear(&src); + + /* test istream with empty content */ + stream = SHCreateMemStream((const BYTE*)nocontent, strlen(nocontent)); + V_VT(&src) = VT_UNKNOWN; + V_UNKNOWN(&src) = (IUnknown*)stream; + b = VARIANT_TRUE; + hr = IXMLDOMDocument_load(doc, src, &b); + todo_wine ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(b == VARIANT_FALSE, "got %d\n", b); + EXPECT_PARSE_ERROR(doc, XML_E_INVALIDATROOTLEVEL, TRUE); + VariantClear(&src); + + /* test istream with valid xml */ + stream = SHCreateMemStream((const BYTE*)complete4A, strlen(complete4A)); + V_VT(&src) = VT_UNKNOWN; + V_UNKNOWN(&src) = (IUnknown*)stream; + b = VARIANT_FALSE; + hr = IXMLDOMDocument_load(doc, src, &b); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(b == VARIANT_TRUE, "got %d\n", b); + EXPECT_PARSE_ERROR(doc, S_OK, FALSE); + VariantClear(&src); + IXMLDOMDocument_Release(doc); free_bstrs();
1
0
0
0
Alexandre Julliard : ntdll: Disallow relative paths in wine_unix_to_nt_file_name(), handle them in the caller.
by Alexandre Julliard
08 Jul '20
08 Jul '20
Module: wine Branch: master Commit: 49fcd632e4b512421810ec4e35dc455b3f7697d3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=49fcd632e4b512421810ec4e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 8 13:53:14 2020 +0200 ntdll: Disallow relative paths in wine_unix_to_nt_file_name(), handle them in the caller. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/path.c | 18 ++++++++++++++++-- dlls/ntdll/path.c | 17 ++--------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c index d0f27d3359..33c39865b9 100644 --- a/dlls/kernel32/path.c +++ b/dlls/kernel32/path.c @@ -301,10 +301,24 @@ WCHAR * CDECL wine_get_dos_file_name( LPCSTR str ) { UNICODE_STRING nt_name; ANSI_STRING unix_name; + NTSTATUS status; + WCHAR *buffer; DWORD len; - RtlInitAnsiString( &unix_name, str ); - if (!set_ntstatus( wine_unix_to_nt_file_name( &unix_name, &nt_name ))) return NULL; + if (str[0] != '/') /* relative path name */ + { + len = strlen( str ) + 1; + if (!(buffer = RtlAllocateHeap( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return NULL; + MultiByteToWideChar( CP_UNIXCP, 0, str, len, buffer, len ); + status = RtlDosPathNameToNtPathName_U_WithStatus( buffer, &nt_name, NULL, NULL ); + RtlFreeHeap( GetProcessHeap(), 0, buffer ); + } + else + { + RtlInitAnsiString( &unix_name, str ); + status = wine_unix_to_nt_file_name( &unix_name, &nt_name ); + } + if (!set_ntstatus( status )) return NULL; if (nt_name.Buffer[5] == ':') { /* get rid of the \??\ prefix */ diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c index c22189a7e7..fb85942eca 100644 --- a/dlls/ntdll/path.c +++ b/dlls/ntdll/path.c @@ -891,23 +891,10 @@ NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING* dir) */ NTSTATUS CDECL wine_unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRING *nt ) { - unsigned int lenW, lenA = name->Length; + unsigned int lenA = name->Length; const char *path = name->Buffer; if (!lenA) return STATUS_INVALID_PARAMETER; - - if (path[0] != '/') /* relative path name */ - { - WCHAR *tmp; - NTSTATUS status; - - if (!(tmp = RtlAllocateHeap( GetProcessHeap(), 0, (lenA + 1) * sizeof(WCHAR) ))) - return STATUS_NO_MEMORY; - lenW = ntdll_umbstowcs( path, lenA, tmp, lenA ); - tmp[lenW] = 0; - status = RtlDosPathNameToNtPathName_U_WithStatus( tmp, nt, NULL, NULL ); - RtlFreeHeap( GetProcessHeap(), 0, tmp ); - return status; - } + if (path[0] != '/') return STATUS_INVALID_PARAMETER; /* relative path not supported */ return unix_funcs->unix_to_nt_file_name( name, nt ); }
1
0
0
0
Alexandre Julliard : mountmgr: Use wine_get_dos_file_name() instead of wine_unix_to_nt_file_name().
by Alexandre Julliard
08 Jul '20
08 Jul '20
Module: wine Branch: master Commit: 3aa4feb578fb1afd4a3b600c86b6eda48a3f0305 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3aa4feb578fb1afd4a3b600c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 8 14:16:21 2020 +0200 mountmgr: Use wine_get_dos_file_name() instead of wine_unix_to_nt_file_name(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mountmgr.sys/device.c | 22 ++++++++-------------- dlls/mountmgr.sys/mountmgr.c | 19 +++++++++++-------- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c index 40176131ca..f7a1f1e9b5 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c @@ -1017,32 +1017,26 @@ static struct volume *find_matching_volume( const char *udi, const char *device, static BOOL get_volume_device_info( struct volume *volume ) { const char *unix_device = volume->device->unix_device; - ANSI_STRING unix_name; - UNICODE_STRING nt_name; - OBJECT_ATTRIBUTES attr; + WCHAR *name; HANDLE handle; - NTSTATUS ret; CDROM_TOC toc; DWORD size; BYTE superblock[SUPERBLOCK_SIZE]; - IO_STATUS_BLOCK io; if (!unix_device) return FALSE; - RtlInitAnsiString( &unix_name, unix_device ); - if ((ret = wine_unix_to_nt_file_name( &unix_name, &nt_name ))) + if (!(name = wine_get_dos_file_name( unix_device ))) { - ERR("Failed to convert %s to NT, status %#x\n", debugstr_a(unix_device), ret); + ERR("Failed to convert %s to NT, err %u\n", debugstr_a(unix_device), GetLastError()); return FALSE; } - - InitializeObjectAttributes( &attr, &nt_name, OBJ_CASE_INSENSITIVE, 0, NULL ); - if ((ret = NtOpenFile( &handle, GENERIC_READ | SYNCHRONIZE, &attr, &io, FILE_SHARE_READ | FILE_SHARE_WRITE, - FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT ))) + handle = CreateFileW( name, GENERIC_READ | SYNCHRONIZE, FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, OPEN_EXISTING, 0, 0 ); + RtlFreeHeap( GetProcessHeap(), 0, name ); + if (handle == INVALID_HANDLE_VALUE) { - WARN("Failed to open %s, status %#x\n", debugstr_a(unix_device), ret); - RtlFreeUnicodeString( &nt_name ); + WARN("Failed to open %s, err %u\n", debugstr_a(unix_device), GetLastError()); return FALSE; } diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c index cf12f03a73..6393dbf022 100644 --- a/dlls/mountmgr.sys/mountmgr.c +++ b/dlls/mountmgr.sys/mountmgr.c @@ -432,7 +432,7 @@ static void WINAPI query_symbol_file( TP_CALLBACK_INSTANCE *instance, void *cont IRP *irp = context; MOUNTMGR_TARGET_NAME *result; CFStringRef query_cfstring; - WCHAR *unix_buf = NULL; + WCHAR *filename, *unix_buf = NULL; ANSI_STRING unix_path; UNICODE_STRING path; MDQueryRef mdquery; @@ -489,16 +489,19 @@ static void WINAPI query_symbol_file( TP_CALLBACK_INSTANCE *instance, void *cont HeapFree( GetProcessHeap(), 0, unix_buf ); if (status) goto done; - status = wine_unix_to_nt_file_name( &unix_path, &path ); + filename = wine_get_dos_file_name( unix_path.Buffer ); RtlFreeAnsiString( &unix_path ); - if (status) goto done; - + if (!filename) + { + status = STATUS_NO_SUCH_FILE; + goto done; + } result = irp->AssociatedIrp.SystemBuffer; - result->DeviceNameLength = path.Length; - size = FIELD_OFFSET(MOUNTMGR_TARGET_NAME, DeviceName[path.Length / sizeof(WCHAR)]); + result->DeviceNameLength = lstrlenW(filename) * sizeof(WCHAR); + size = FIELD_OFFSET(MOUNTMGR_TARGET_NAME, DeviceName[lstrlenW(filename)]); if (size <= IoGetCurrentIrpStackLocation(irp)->Parameters.DeviceIoControl.OutputBufferLength) { - memcpy( result->DeviceName, path.Buffer, path.Length ); + memcpy( result->DeviceName, filename, lstrlenW(filename) * sizeof(WCHAR) ); irp->IoStatus.Information = size; status = STATUS_SUCCESS; } @@ -507,7 +510,7 @@ static void WINAPI query_symbol_file( TP_CALLBACK_INSTANCE *instance, void *cont irp->IoStatus.Information = sizeof(*result); status = STATUS_BUFFER_OVERFLOW; } - RtlFreeUnicodeString( &path ); + RtlFreeHeap( GetProcessHeap(), 0, filename ); done: irp->IoStatus.u.Status = status;
1
0
0
0
Alexandre Julliard : kernel32: Move RemoveDirectoryA/W() implementation to kernelbase.
by Alexandre Julliard
08 Jul '20
08 Jul '20
Module: wine Branch: master Commit: f8699c0a71a528d287b84cd0bc5b5bb7cec924f0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f8699c0a71a528d287b84cd0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 8 12:47:46 2020 +0200 kernel32: Move RemoveDirectoryA/W() implementation to kernelbase. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/kernel32.spec | 4 +-- dlls/kernel32/path.c | 62 ----------------------------------------- dlls/kernelbase/file.c | 44 +++++++++++++++++++++++++++++ dlls/kernelbase/kernelbase.spec | 4 +-- dlls/ntdll/tests/file.c | 3 +- 5 files changed, 50 insertions(+), 67 deletions(-) diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index b19dfa00df..0c64144d7f 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1268,8 +1268,8 @@ @ stdcall ReleaseSemaphoreWhenCallbackReturns(ptr long long) ntdll.TpCallbackReleaseSemaphoreOnCompletion @ stdcall ReleaseSRWLockExclusive(ptr) ntdll.RtlReleaseSRWLockExclusive @ stdcall ReleaseSRWLockShared(ptr) ntdll.RtlReleaseSRWLockShared -@ stdcall RemoveDirectoryA(str) -@ stdcall RemoveDirectoryW(wstr) +@ stdcall -import RemoveDirectoryA(str) +@ stdcall -import RemoveDirectoryW(wstr) # @ stub RemoveLocalAlternateComputerNameA # @ stub RemoveLocalAlternateComputerNameW @ stdcall RemoveVectoredContinueHandler(ptr) ntdll.RtlRemoveVectoredContinueHandler diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c index db2c1fb024..d0f27d3359 100644 --- a/dlls/kernel32/path.c +++ b/dlls/kernel32/path.c @@ -228,68 +228,6 @@ BOOL WINAPI CreateDirectoryExA( LPCSTR template, LPCSTR path, LPSECURITY_ATTRIBU } -/*********************************************************************** - * RemoveDirectoryW (KERNEL32.@) - */ -BOOL WINAPI RemoveDirectoryW( LPCWSTR path ) -{ - OBJECT_ATTRIBUTES attr; - UNICODE_STRING nt_name; - ANSI_STRING unix_name; - IO_STATUS_BLOCK io; - NTSTATUS status; - HANDLE handle; - BOOL ret = FALSE; - - TRACE( "%s\n", debugstr_w(path) ); - - if (!RtlDosPathNameToNtPathName_U( path, &nt_name, NULL, NULL )) - { - SetLastError( ERROR_PATH_NOT_FOUND ); - return FALSE; - } - attr.Length = sizeof(attr); - attr.RootDirectory = 0; - attr.Attributes = OBJ_CASE_INSENSITIVE; - attr.ObjectName = &nt_name; - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; - - if (!set_ntstatus( NtOpenFile( &handle, DELETE | SYNCHRONIZE, &attr, &io, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT ))) - { - RtlFreeUnicodeString( &nt_name ); - return FALSE; - } - - status = wine_nt_to_unix_file_name( &nt_name, &unix_name, FILE_OPEN ); - RtlFreeUnicodeString( &nt_name ); - if (!set_ntstatus( status )) - { - NtClose( handle ); - return FALSE; - } - - if (!(ret = (rmdir( unix_name.Buffer ) != -1))) FILE_SetDosError(); - RtlFreeAnsiString( &unix_name ); - NtClose( handle ); - return ret; -} - - -/*********************************************************************** - * RemoveDirectoryA (KERNEL32.@) - */ -BOOL WINAPI RemoveDirectoryA( LPCSTR path ) -{ - WCHAR *pathW; - - if (!(pathW = FILE_name_AtoW( path, FALSE ))) return FALSE; - return RemoveDirectoryW( pathW ); -} - - /*********************************************************************** * GetSystemDirectoryW (KERNEL32.@) * diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c index bd87f75665..9d082f1a64 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c @@ -3448,6 +3448,50 @@ BOOL WINAPI DECLSPEC_HOTPATCH ReadFileScatter( HANDLE file, FILE_SEGMENT_ELEMENT } +/*********************************************************************** + * RemoveDirectoryA (kernelbase.@) + */ +BOOL WINAPI DECLSPEC_HOTPATCH RemoveDirectoryA( LPCSTR path ) +{ + WCHAR *pathW; + + if (!(pathW = file_name_AtoW( path, FALSE ))) return FALSE; + return RemoveDirectoryW( pathW ); +} + + +/*********************************************************************** + * RemoveDirectoryW (kernelbase.@) + */ +BOOL WINAPI DECLSPEC_HOTPATCH RemoveDirectoryW( LPCWSTR path ) +{ + OBJECT_ATTRIBUTES attr; + UNICODE_STRING nt_name; + IO_STATUS_BLOCK io; + NTSTATUS status; + HANDLE handle; + + TRACE( "%s\n", debugstr_w(path) ); + + status = RtlDosPathNameToNtPathName_U_WithStatus( path, &nt_name, NULL, NULL ); + if (!set_ntstatus( status )) return FALSE; + + InitializeObjectAttributes( &attr, &nt_name, OBJ_CASE_INSENSITIVE, 0, NULL ); + status = NtOpenFile( &handle, DELETE | SYNCHRONIZE, &attr, &io, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT ); + RtlFreeUnicodeString( &nt_name ); + + if (!status) + { + FILE_DISPOSITION_INFORMATION info = { TRUE }; + status = NtSetInformationFile( handle, &io, &info, sizeof(info), FileDispositionInformation ); + NtClose( handle ); + } + return set_ntstatus( status ); +} + + /************************************************************************** * SetEndOfFile (kernelbase.@) */ diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 8c184ff4f4..3f778685a7 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1331,8 +1331,8 @@ @ stdcall ReleaseSemaphoreWhenCallbackReturns(ptr long long) ntdll.TpCallbackReleaseSemaphoreOnCompletion # @ stub ReleaseStateLock @ stdcall RemapPredefinedHandleInternal(long long) -@ stdcall RemoveDirectoryA(str) kernel32.RemoveDirectoryA -@ stdcall RemoveDirectoryW(wstr) kernel32.RemoveDirectoryW +@ stdcall RemoveDirectoryA(str) +@ stdcall RemoveDirectoryW(wstr) @ stdcall RemoveDllDirectory(ptr) # @ stub RemovePackageStatus # @ stub RemovePackageStatusForUser diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index 9e65a1f6dd..6164b0c4bd 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -3082,16 +3082,17 @@ todo_wine fileDeleted = RemoveDirectoryA( buffer ); ok( fileDeleted, "Directory should have been deleted\n" ); fileDeleted = GetFileAttributesA( buffer ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; -todo_wine ok( !fileDeleted, "Directory shouldn't have been deleted\n" ); res = nt_get_file_attrs( buffer, &fdi2 ); todo_wine ok( res == STATUS_DELETE_PENDING, "got %#x\n", res ); /* can't open the deleted directory */ handle2 = CreateFileA(buffer, DELETE, FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); +todo_wine ok( handle2 == INVALID_HANDLE_VALUE, "CreateFile should fail\n" ); todo_wine ok(GetLastError() == ERROR_ACCESS_DENIED, "got %u\n", GetLastError()); + if (handle2 != INVALID_HANDLE_VALUE) CloseHandle( handle2 ); CloseHandle( handle ); fileDeleted = GetFileAttributesA( buffer ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; ok( fileDeleted, "Directory should have been deleted\n" );
1
0
0
0
Alexandre Julliard : ntdll: Move NtQueryObject/NtSetInformationObject to the Unix library.
by Alexandre Julliard
08 Jul '20
08 Jul '20
Module: wine Branch: master Commit: 518decf16b8445f49cb8bddfd081e7911ae28212 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=518decf16b8445f49cb8bddf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 8 12:21:38 2020 +0200 ntdll: Move NtQueryObject/NtSetInformationObject to the Unix library. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/file.c | 34 -------- dlls/ntdll/ntdll_misc.h | 2 - dlls/ntdll/om.c | 192 +------------------------------------------ dlls/ntdll/unix/file.c | 210 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/ntdll/unix/loader.c | 2 + dlls/ntdll/unixlib.h | 6 +- 6 files changed, 219 insertions(+), 227 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=518decf16b8445f49cb8…
1
0
0
0
Alexandre Julliard : winebuild: Generate Windows-style syscall thunks on x86_64.
by Alexandre Julliard
08 Jul '20
08 Jul '20
Module: wine Branch: master Commit: 917a206b01c82170a862e8497cbe26b6f1bfade0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=917a206b01c82170a862e849…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 8 09:20:57 2020 +0200 winebuild: Generate Windows-style syscall thunks on x86_64. Based on patches by Michael Müller. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/mapping.c | 6 ++++- tools/winebuild/import.c | 68 +++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 67 insertions(+), 7 deletions(-) diff --git a/server/mapping.c b/server/mapping.c index 07c51c246d..ce70b696bd 100644 --- a/server/mapping.c +++ b/server/mapping.c @@ -964,7 +964,11 @@ struct object *create_user_data_mapping( struct object *root, const struct unico if (!(mapping = create_mapping( root, name, OBJ_OPENIF, sizeof(KSHARED_USER_DATA), SEC_COMMIT, 0, FILE_READ_DATA | FILE_WRITE_DATA, NULL ))) return NULL; ptr = mmap( NULL, mapping->size, PROT_WRITE, MAP_SHARED, get_unix_fd( mapping->fd ), 0 ); - if (ptr != MAP_FAILED) user_shared_data = ptr; + if (ptr != MAP_FAILED) + { + user_shared_data = ptr; + user_shared_data->SystemCallPad[0] = 1; + } return &mapping->obj; } diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index b40c2c3107..b725e81163 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -1484,12 +1484,46 @@ void output_syscalls( DLLSPEC *spec ) output( "\tjmp 2b\n" ); break; case CPU_x86_64: + output( "\tpushq %%rbp\n" ); + output_cfi( ".cfi_adjust_cfa_offset 8" ); + output_cfi( ".cfi_rel_offset %%rbp,0" ); + output( "\tmovq %%rsp,%%rbp\n" ); + output_cfi( ".cfi_def_cfa_register %%rbp" ); + output( "\tpushq %%rsi\n" ); + output_cfi( ".cfi_rel_offset %%rsi,-8" ); + output( "\tpushq %%rdi\n" ); + output_cfi( ".cfi_rel_offset %%rdi,-16" ); + /* Legends of Runeterra hooks the first system call return instruction, and + * depends on us returning to it. Adjust the return address accordingly. */ + output( "\tsubq $0xb,0x8(%%rbp)\n" ); output( "\tcmpq $%u,%%rax\n", count ); - output( "\tjae 1f\n" ); + output( "\tjae 3f\n" ); + output( "\tmovzbq .Lsyscall_args(%%rip),%%rcx\n" ); + output( "\tsubq $0x20,%%rcx\n" ); + output( "\tjbe 1f\n" ); + output( "\tsubq %%rcx,%%rsp\n" ); + output( "\tshrq $3,%%rcx\n" ); + output( "\tleaq 0x38(%%rbp),%%rsi\n" ); + output( "\tandq $~15,%%rsp\n\t" ); + output( "\tmovq %%rsp,%%rdi\n" ); + output( "\tcld\n" ); + output( "\trep; movsq\n" ); + output( "1:\tmovq %%r10,%%rcx\n" ); + output( "\tsubq $0x20,%%rsp\n" ); output( "\tleaq .Lsyscall_table(%%rip),%%r10\n" ); - output( "\tjmpq *(%%r10,%%rax,8)\n" ); - output( "1:\tmovl $0x%x,%%eax\n", invalid_param ); + output( "\tcallq *(%%r10,%%rax,8)\n" ); + output( "2:\tleaq -0x10(%%rbp),%%rsp\n" ); + output( "\tpopq %%rdi\n" ); + output_cfi( ".cfi_same_value %%rdi" ); + output( "\tpopq %%rsi\n" ); + output_cfi( ".cfi_same_value %%rsi" ); + output_cfi( ".cfi_def_cfa_register %%rsp" ); + output( "\tpopq %%rbp\n" ); + output_cfi( ".cfi_adjust_cfa_offset -8" ); + output_cfi( ".cfi_same_value %%rbp" ); output( "\tret\n" ); + output( "3:\tmovl $0x%x,%%eax\n", invalid_param ); + output( "\tjmp 2b\n" ); break; case CPU_ARM: output( "\tldr r1, 4f\n" ); @@ -1562,9 +1596,31 @@ void output_syscalls( DLLSPEC *spec ) output( "\tret $%u\n", get_args_size( odp )); break; case CPU_x86_64: - /* FIXME: syscall thunks not binary-compatible yet */ - output( "\tmovl $%u,%%eax\n", i ); - output( "\tjmpq *%s(%%rip)\n", asm_name("__wine_syscall_dispatcher") ); + /* Chromium depends on syscall thunks having the same form as on + * Windows. For 64-bit systems the only viable form we can emulate is + * having an int $0x2e fallback. Since actually using an interrupt is + * expensive, and since for some reason Chromium doesn't actually + * validate that instruction, we can just put a jmp there instead. */ + output( "\t.byte 0x4c,0x8b,0xd1\n" ); /* movq %rcx,%r10 */ + output( "\t.byte 0xb8\n" ); /* movl $i,%eax */ + output( "\t.long %u\n", i ); + output( "\t.byte 0xf6,0x04,0x25,0x08,0x03,0xfe,0x7f,0x01\n" ); /* testb $1,0x7ffe0308 */ + output( "\t.byte 0x75,0x03\n" ); /* jne 1f */ + output( "\t.byte 0x0f,0x05\n" ); /* syscall */ + output( "\t.byte 0xc3\n" ); /* ret */ + output( "\tjmp 1f\n" ); + output( "\t.byte 0xc3\n" ); /* ret */ + if (target_platform == PLATFORM_WINDOWS) + { + output( "1:\t.byte 0xff,0x14,0x25\n" ); /* 2: callq *(__wine_syscall_dispatcher) */ + output( "\t.long __wine_syscall_dispatcher\n" ); + } + else + { + output( "\tnop\n" ); + output( "1:\tcallq *%s(%%rip)\n", asm_name("__wine_syscall_dispatcher") ); + } + output( "\tret\n" ); break; case CPU_ARM: output( "\tpush {r0-r1}\n" );
1
0
0
0
← Newer
1
...
64
65
66
67
68
69
70
...
83
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
Results per page:
10
25
50
100
200