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
October 2023
----- 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
702 discussions
Start a n
N
ew thread
Zebediah Figura : objsel: Do not check for a NULL interface in COM methods.
by Alexandre Julliard
07 Oct '23
07 Oct '23
Module: wine Branch: master Commit: 2ac66e33fd89bbae31367ebda94415424d812a56 URL:
https://gitlab.winehq.org/wine/wine/-/commit/2ac66e33fd89bbae31367ebda94415…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Sep 6 17:45:49 2023 -0500 objsel: Do not check for a NULL interface in COM methods. --- dlls/objsel/objsel.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/dlls/objsel/objsel.c b/dlls/objsel/objsel.c index 0c809673c44..41f548bbc75 100644 --- a/dlls/objsel/objsel.c +++ b/dlls/objsel/objsel.c @@ -59,8 +59,6 @@ static ULONG WINAPI OBJSEL_IDsObjectPicker_AddRef(IDsObjectPicker * iface) TRACE("\n"); - if (This == NULL) return E_POINTER; - return InterlockedIncrement(&This->ref); } @@ -75,8 +73,6 @@ static ULONG WINAPI OBJSEL_IDsObjectPicker_Release(IDsObjectPicker * iface) TRACE("\n"); - if (This == NULL) return E_POINTER; - ref = InterlockedDecrement(&This->ref); if (ref == 0) @@ -209,9 +205,6 @@ static ULONG WINAPI class_factory_AddRef(IClassFactory *iface) TRACE("\n"); - if (!factory) - return E_POINTER; - return InterlockedIncrement(&factory->ref); } @@ -222,9 +215,6 @@ static ULONG WINAPI class_factory_Release(IClassFactory *iface) TRACE("\n"); - if (!factory) - return E_POINTER; - return InterlockedDecrement(&factory->ref); }
1
0
0
0
Zebediah Figura : objsel: Merge factory.c into objsel.c.
by Alexandre Julliard
07 Oct '23
07 Oct '23
Module: wine Branch: master Commit: 026c7fc6b52f26b75de920f57766c807a329610d URL:
https://gitlab.winehq.org/wine/wine/-/commit/026c7fc6b52f26b75de920f57766c8…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Sep 6 17:41:14 2023 -0500 objsel: Merge factory.c into objsel.c. A separate file for the class factory is not justified. --- dlls/objsel/Makefile.in | 1 - dlls/objsel/factory.c | 152 ------------------------------------------- dlls/objsel/objsel.c | 151 ++++++++++++++++++++++++++++++++++++------ dlls/objsel/objsel_private.h | 43 ------------ 4 files changed, 131 insertions(+), 216 deletions(-)
1
0
0
0
Zebediah Figura : objsel: Remove DLL refcount tracking.
by Alexandre Julliard
07 Oct '23
07 Oct '23
Module: wine Branch: master Commit: 39ccd7199160bd0e9ed3ed4a040328f930369706 URL:
https://gitlab.winehq.org/wine/wine/-/commit/39ccd7199160bd0e9ed3ed4a040328…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Sep 6 13:05:14 2023 -0500 objsel: Remove DLL refcount tracking. Recent consensus seems to be that this isn't worth the effort. --- dlls/objsel/factory.c | 20 ++------------------ dlls/objsel/objsel.c | 24 +----------------------- dlls/objsel/objsel_private.h | 6 ------ 3 files changed, 3 insertions(+), 47 deletions(-) diff --git a/dlls/objsel/factory.c b/dlls/objsel/factory.c index cb0fb491cb4..c3e64f0568a 100644 --- a/dlls/objsel/factory.c +++ b/dlls/objsel/factory.c @@ -66,20 +66,12 @@ static HRESULT WINAPI OBJSEL_IClassFactory_QueryInterface( static ULONG WINAPI OBJSEL_IClassFactory_AddRef(LPCLASSFACTORY iface) { ClassFactoryImpl *This = impl_from_IClassFactory(iface); - ULONG ref; TRACE("\n"); if (This == NULL) return E_POINTER; - ref = InterlockedIncrement(&This->ref); - - if (ref == 1) - { - InterlockedIncrement(&dll_refs); - } - - return ref; + return InterlockedIncrement(&This->ref); } @@ -89,20 +81,12 @@ static ULONG WINAPI OBJSEL_IClassFactory_AddRef(LPCLASSFACTORY iface) static ULONG WINAPI OBJSEL_IClassFactory_Release(LPCLASSFACTORY iface) { ClassFactoryImpl *This = impl_from_IClassFactory(iface); - ULONG ref; TRACE("\n"); if (This == NULL) return E_POINTER; - ref = InterlockedDecrement(&This->ref); - - if (ref == 0) - { - InterlockedDecrement(&dll_refs); - } - - return ref; + return InterlockedDecrement(&This->ref); } diff --git a/dlls/objsel/objsel.c b/dlls/objsel/objsel.c index 90873191691..026a6d594af 100644 --- a/dlls/objsel/objsel.c +++ b/dlls/objsel/objsel.c @@ -24,8 +24,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(objsel); -LONG dll_refs = 0; - /*********************************************************************** * DllGetClassObject (OBJSEL.@) */ @@ -43,15 +41,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) } -/*********************************************************************** - * DllCanUnloadNow (OBJSEL.@) - */ -HRESULT WINAPI DllCanUnloadNow(void) -{ - return dll_refs != 0 ? S_FALSE : S_OK; -} - - /********************************************************************** * OBJSEL_IDsObjectPicker_Destroy (also IUnknown) */ @@ -74,20 +63,12 @@ static inline IDsObjectPickerImpl *impl_from_IDsObjectPicker(IDsObjectPicker *if static ULONG WINAPI OBJSEL_IDsObjectPicker_AddRef(IDsObjectPicker * iface) { IDsObjectPickerImpl *This = impl_from_IDsObjectPicker(iface); - ULONG ref; TRACE("\n"); if (This == NULL) return E_POINTER; - ref = InterlockedIncrement(&This->ref); - - if (ref == 1) - { - InterlockedIncrement(&dll_refs); - } - - return ref; + return InterlockedIncrement(&This->ref); } @@ -106,10 +87,7 @@ static ULONG WINAPI OBJSEL_IDsObjectPicker_Release(IDsObjectPicker * iface) ref = InterlockedDecrement(&This->ref); if (ref == 0) - { - InterlockedDecrement(&dll_refs); OBJSEL_IDsObjectPicker_Destroy(This); - } return ref; } diff --git a/dlls/objsel/objsel_private.h b/dlls/objsel/objsel_private.h index b0a2e956733..86ea129089b 100644 --- a/dlls/objsel/objsel_private.h +++ b/dlls/objsel/objsel_private.h @@ -23,12 +23,6 @@ #include "objidl.h" #include "objsel.h" -/********************************************************************** - * Dll lifetime tracking declaration for objsel.dll - */ - -extern LONG dll_refs DECLSPEC_HIDDEN; - /********************************************************************** * ClassFactory declaration for objsel.dll */
1
0
0
0
Zebediah Figura : objsel: Remove unnecessary includes.
by Alexandre Julliard
07 Oct '23
07 Oct '23
Module: wine Branch: master Commit: 528fdc783bf8fe84cf232b90b5d19acc258c0a32 URL:
https://gitlab.winehq.org/wine/wine/-/commit/528fdc783bf8fe84cf232b90b5d19a…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Sep 6 13:01:43 2023 -0500 objsel: Remove unnecessary includes. --- dlls/objsel/objsel.c | 1 - dlls/objsel/objsel_private.h | 16 +--------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/dlls/objsel/objsel.c b/dlls/objsel/objsel.c index e42ac5ab898..90873191691 100644 --- a/dlls/objsel/objsel.c +++ b/dlls/objsel/objsel.c @@ -19,7 +19,6 @@ */ #include "objsel_private.h" -#include "rpcproxy.h" #include "wine/debug.h" diff --git a/dlls/objsel/objsel_private.h b/dlls/objsel/objsel_private.h index 9289c00d8c9..b0a2e956733 100644 --- a/dlls/objsel/objsel_private.h +++ b/dlls/objsel/objsel_private.h @@ -18,24 +18,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <string.h> -#include <stdarg.h> -#include <stdio.h> -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - #define COBJMACROS -#include "ole2.h" -#include "strmif.h" -#include "olectl.h" -#include "unknwn.h" +#include "objidl.h" #include "objsel.h" -#include "uuids.h" /********************************************************************** * Dll lifetime tracking declaration for objsel.dll
1
0
0
0
Alex Henrie : riched20: Use CRT allocation functions.
by Alexandre Julliard
07 Oct '23
07 Oct '23
Module: wine Branch: master Commit: 42579f1dcd2f14e765e2f53ceb5b46fff5623f10 URL:
https://gitlab.winehq.org/wine/wine/-/commit/42579f1dcd2f14e765e2f53ceb5b46…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sun Sep 24 11:36:20 2023 -0600 riched20: Use CRT allocation functions. --- dlls/riched20/caret.c | 2 +- dlls/riched20/clipboard.c | 8 +++--- dlls/riched20/editor.c | 36 ++++++++++++------------ dlls/riched20/editstr.h | 1 - dlls/riched20/list.c | 8 +++--- dlls/riched20/reader.c | 72 +++++++++++++++++------------------------------ dlls/riched20/richole.c | 22 +++++++-------- dlls/riched20/string.c | 24 ++++++++-------- dlls/riched20/style.c | 4 +-- dlls/riched20/table.c | 2 +- dlls/riched20/txthost.c | 12 ++++---- dlls/riched20/txtsrv.c | 4 +-- dlls/riched20/undo.c | 8 +++--- dlls/riched20/wrap.c | 18 ++++++------ dlls/riched20/writer.c | 12 ++++---- 15 files changed, 106 insertions(+), 127 deletions(-)
1
0
0
0
Alexandre Julliard : ntdll: Only create the main module on the 32-bit side for wow64.
by Alexandre Julliard
07 Oct '23
07 Oct '23
Module: wine Branch: master Commit: de81e2ea41b27a14f88177639c5b5d35a210b5bd URL:
https://gitlab.winehq.org/wine/wine/-/commit/de81e2ea41b27a14f88177639c5b5d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Oct 6 15:08:02 2023 +0200 ntdll: Only create the main module on the 32-bit side for wow64. --- dlls/ntdll/loader.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index cfb1e833cc6..2bf1437623f 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -4219,16 +4219,13 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR init_user_process_params(); load_global_options(); version_init(); + build_ntdll_module( meminfo.AllocationBase ); - get_env_var( L"WINESYSTEMDLLPATH", 0, &system_dll_path ); + if (NtCurrentTeb()->WowTebOffset) init_wow64( context ); wm = build_main_module(); wm->ldr.LoadCount = -1; - build_ntdll_module( meminfo.AllocationBase ); - - if (NtCurrentTeb()->WowTebOffset) init_wow64( context ); - if ((status = load_dll( NULL, L"kernel32.dll", 0, &kernel32, FALSE )) != STATUS_SUCCESS) { MESSAGE( "wine: could not load kernel32.dll, status %lx\n", status ); @@ -4245,6 +4242,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR actctx_init(); locale_init(); + get_env_var( L"WINESYSTEMDLLPATH", 0, &system_dll_path ); if (wm->ldr.Flags & LDR_COR_ILONLY) status = fixup_imports_ilonly( wm, NULL, entry ); else
1
0
0
0
Alexandre Julliard : server: Remove some leftover code from a failed rebase.
by Alexandre Julliard
07 Oct '23
07 Oct '23
Module: wine Branch: master Commit: 93a5dce013a0b992e18ff6b923dcbb6535577ab3 URL:
https://gitlab.winehq.org/wine/wine/-/commit/93a5dce013a0b992e18ff6b923dcbb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Oct 6 11:23:46 2023 +0200 server: Remove some leftover code from a failed rebase. --- server/mapping.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/server/mapping.c b/server/mapping.c index c570bcf8f94..a795dc4b38b 100644 --- a/server/mapping.c +++ b/server/mapping.c @@ -833,11 +833,6 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s !(nt.FileHeader.Characteristics & IMAGE_FILE_RELOCS_STRIPPED)); if (nt.opt.hdr64.SectionAlignment & page_mask) mapping->image.image_flags |= IMAGE_FLAGS_ImageMappedFlat; - else if (nt.opt.hdr64.NumberOfRvaAndSizes > IMAGE_DIRECTORY_ENTRY_BASERELOC && - nt.opt.hdr64.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress && - nt.opt.hdr64.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].Size && - !(nt.FileHeader.Characteristics & IMAGE_FILE_RELOCS_STRIPPED)) - mapping->image.image_flags |= IMAGE_FLAGS_ImageDynamicallyRelocated; else if ((nt.opt.hdr64.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE) && (has_relocs || mapping->image.contains_code) && !(clr_va && clr_size)) mapping->image.image_flags |= IMAGE_FLAGS_ImageDynamicallyRelocated;
1
0
0
0
Nikolay Sivov : d3d10/effect: Add support for shift instructions.
by Alexandre Julliard
05 Oct '23
05 Oct '23
Module: wine Branch: master Commit: 41ab207c71cfaa82ef95c83b291654aba023a45c URL:
https://gitlab.winehq.org/wine/wine/-/commit/41ab207c71cfaa82ef95c83b291654…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Oct 5 00:20:47 2023 +0200 d3d10/effect: Add support for shift instructions. --- dlls/d3d10/effect.c | 43 ++++++++++ dlls/d3d10/tests/effect.c | 215 ++++++++++++++++++++++++++++++---------------- 2 files changed, 183 insertions(+), 75 deletions(-)
1
0
0
0
Joel Holdsworth : ntdll: Add support for FILE_{RENAME,LINK}_IGNORE_READONLY_ATTRIBUTE.
by Alexandre Julliard
05 Oct '23
05 Oct '23
Module: wine Branch: master Commit: e916255216e708e7646f87ebc5a860039660a87f URL:
https://gitlab.winehq.org/wine/wine/-/commit/e916255216e708e7646f87ebc5a860…
Author: Joel Holdsworth <joel(a)airwebreathe.org.uk> Date: Mon Aug 7 11:32:44 2023 +0100 ntdll: Add support for FILE_{RENAME,LINK}_IGNORE_READONLY_ATTRIBUTE. Signed-off-by: Joel Holdsworth <joel(a)airwebreathe.org.uk> --- dlls/ntdll/tests/file.c | 14 +++++++------- dlls/ntdll/unix/file.c | 4 ++-- server/fd.c | 3 ++- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index a00a425582c..4e1750a4751 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -2259,10 +2259,10 @@ static void test_file_rename_information_ex(void) io.Status = 0xdeadbeef; res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformationEx ); - todo_wine ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status ); - todo_wine ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res ); + ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status ); + ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res ); fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; - todo_wine ok( fileDeleted, "file should not exist\n" ); + ok( fileDeleted, "file should not exist\n" ); fileDeleted = GetFileAttributesW( newpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; ok( !fileDeleted, "file should exist\n" ); @@ -3076,8 +3076,8 @@ static void test_file_link_information_ex(void) return; } - ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status ); - todo_wine ok( res == STATUS_ACCESS_DENIED, "res expected STATUS_ACCESS_DENIED, got %lx\n", res ); + todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status ); + ok( res == STATUS_ACCESS_DENIED, "res expected STATUS_ACCESS_DENIED, got %lx\n", res ); fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; ok( !fileDeleted, "file should exist\n" ); fileDeleted = GetFileAttributesW( newpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; @@ -3110,8 +3110,8 @@ static void test_file_link_information_ex(void) io.Status = 0xdeadbeef; res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformationEx ); - todo_wine ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status ); - todo_wine ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res ); + ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status ); + ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res ); fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; ok( !fileDeleted, "file should exist\n" ); fileDeleted = GetFileAttributesW( newpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index aa2ec9bae59..c6533710365 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -4797,7 +4797,7 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, else flags = info->Flags; - if (flags & ~FILE_RENAME_REPLACE_IF_EXISTS) + if (flags & ~(FILE_RENAME_REPLACE_IF_EXISTS | FILE_RENAME_IGNORE_READONLY_ATTRIBUTE)) FIXME( "unsupported flags: %#x\n", flags ); name_str.Buffer = info->FileName; @@ -4844,7 +4844,7 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, else flags = info->Flags; - if (flags & ~FILE_LINK_REPLACE_IF_EXISTS) + if (flags & ~(FILE_LINK_REPLACE_IF_EXISTS | FILE_LINK_IGNORE_READONLY_ATTRIBUTE)) FIXME( "unsupported flags: %#x\n", flags ); name_str.Buffer = info->FileName; diff --git a/server/fd.c b/server/fd.c index 00c0e4ac847..8576882aaa9 100644 --- a/server/fd.c +++ b/server/fd.c @@ -2601,7 +2601,8 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da } /* read-only files cannot be replaced */ - if (!(st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH))) + if (!(st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)) && + !(flags & FILE_RENAME_IGNORE_READONLY_ATTRIBUTE)) { set_error( STATUS_ACCESS_DENIED ); goto failed;
1
0
0
0
Joel Holdsworth : server: Don't allow read-only files to be replaced by File{Rename,Link}Information{,Ex}.
by Alexandre Julliard
05 Oct '23
05 Oct '23
Module: wine Branch: master Commit: a8489d12eb8161cd0434ec57774e87ea70a44716 URL:
https://gitlab.winehq.org/wine/wine/-/commit/a8489d12eb8161cd0434ec57774e87…
Author: Joel Holdsworth <joel(a)airwebreathe.org.uk> Date: Mon Aug 7 11:30:31 2023 +0100 server: Don't allow read-only files to be replaced by File{Rename,Link}Information{,Ex}. Signed-off-by: Joel Holdsworth <joel(a)airwebreathe.org.uk> --- dlls/ntdll/tests/file.c | 16 ++++++++-------- server/fd.c | 7 +++++++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index ae8956dedf4..a00a425582c 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -2226,9 +2226,9 @@ static void test_file_rename_information_ex(void) } todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status ); - todo_wine ok( res == STATUS_ACCESS_DENIED, "res expected STATUS_ACCESS_DENIED, got %lx\n", res ); + ok( res == STATUS_ACCESS_DENIED, "res expected STATUS_ACCESS_DENIED, got %lx\n", res ); fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; - todo_wine ok( !fileDeleted, "file should exist\n" ); + ok( !fileDeleted, "file should exist\n" ); fileDeleted = GetFileAttributesW( newpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; ok( !fileDeleted, "file should exist\n" ); @@ -2259,10 +2259,10 @@ static void test_file_rename_information_ex(void) io.Status = 0xdeadbeef; res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformationEx ); - ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status ); - ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res ); + todo_wine ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status ); + todo_wine ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res ); fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; - ok( fileDeleted, "file should not exist\n" ); + todo_wine ok( fileDeleted, "file should not exist\n" ); fileDeleted = GetFileAttributesW( newpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; ok( !fileDeleted, "file should exist\n" ); @@ -3076,7 +3076,7 @@ static void test_file_link_information_ex(void) return; } - todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status ); + ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status ); todo_wine ok( res == STATUS_ACCESS_DENIED, "res expected STATUS_ACCESS_DENIED, got %lx\n", res ); fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; ok( !fileDeleted, "file should exist\n" ); @@ -3110,8 +3110,8 @@ static void test_file_link_information_ex(void) io.Status = 0xdeadbeef; res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformationEx ); - ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status ); - ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res ); + todo_wine ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status ); + todo_wine ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res ); fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; ok( !fileDeleted, "file should exist\n" ); fileDeleted = GetFileAttributesW( newpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; diff --git a/server/fd.c b/server/fd.c index 2785bd54d63..00c0e4ac847 100644 --- a/server/fd.c +++ b/server/fd.c @@ -2600,6 +2600,13 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da goto failed; } + /* read-only files cannot be replaced */ + if (!(st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH))) + { + set_error( STATUS_ACCESS_DENIED ); + goto failed; + } + /* can't replace an opened file */ if ((inode = get_inode( st.st_dev, st.st_ino, -1 ))) {
1
0
0
0
← Newer
1
...
55
56
57
58
59
60
61
...
71
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
Results per page:
10
25
50
100
200