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 2022
----- 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
639 discussions
Start a n
N
ew thread
Tim Clem : mountmgr.sys: Always set the return size from dhcp_request implementations.
by Alexandre Julliard
05 Jul '22
05 Jul '22
Module: wine Branch: master Commit: 6c465ae8efeecc7580629dc8a9c26198b743c2da URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6c465ae8efeecc7580629dc8…
Author: Tim Clem <tclem(a)codeweavers.com> Date: Tue Jul 5 10:41:32 2022 -0700 mountmgr.sys: Always set the return size from dhcp_request implementations. Also return STATUS_SUCCESS rather than 0 in early-out cases. Signed-off-by: Tim Clem <tclem(a)codeweavers.com> --- dlls/mountmgr.sys/dbus.c | 3 ++- dlls/mountmgr.sys/diskarb.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/mountmgr.sys/dbus.c b/dlls/mountmgr.sys/dbus.c index 81c9f89d246..051f735b219 100644 --- a/dlls/mountmgr.sys/dbus.c +++ b/dlls/mountmgr.sys/dbus.c @@ -777,8 +777,9 @@ NTSTATUS dhcp_request( void *args ) ULONG ret = 0; params->req->offset = params->req->size = 0; + *params->ret_size = 0; - if (!(reply = dhcp4_config_option_request( params->unix_name, map_option(params->req->id), &value ))) return 0; + if (!(reply = dhcp4_config_option_request( params->unix_name, map_option(params->req->id), &value ))) return STATUS_SUCCESS; switch (params->req->id) { diff --git a/dlls/mountmgr.sys/diskarb.c b/dlls/mountmgr.sys/diskarb.c index 462ff82c691..4bcd72c8916 100644 --- a/dlls/mountmgr.sys/diskarb.c +++ b/dlls/mountmgr.sys/diskarb.c @@ -293,18 +293,19 @@ NTSTATUS dhcp_request( void *args ) params->req->offset = 0; params->req->size = 0; + *params->ret_size = 0; if (!service_id) return 0; if (!(dict = SCDynamicStoreCopyDHCPInfo( NULL, service_id ))) { CFRelease( service_id ); - return 0; + return STATUS_SUCCESS; } CFRelease( service_id ); if (!(value = DHCPInfoGetOptionData( dict, map_option(params->req->id) ))) { CFRelease( dict ); - return 0; + return STATUS_SUCCESS; } len = CFDataGetLength( value );
1
0
0
0
Dmitry Timoshkov : d2d1/tests: Fix compilation with clang.
by Alexandre Julliard
05 Jul '22
05 Jul '22
Module: wine Branch: master Commit: 3f36d7e25b1668685493caffb319f34f8b84bacb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3f36d7e25b1668685493caff…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Jul 5 08:27:54 2022 +0300 d2d1/tests: Fix compilation with clang. ../wine.src/dlls/d2d1/tests/d2d1.c:11078:11: error: cannot combine with previous 'type-name' declaration specifier INT32 _int32; ^ ../wine.src/dlls/d2d1/tests/d2d1.c:11078:5: warning: declaration does not declare anything [-Wmissing-declarations] INT32 _int32; ^~~~~~~~~~~~ Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d2d1/tests/d2d1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 1a964475168..3a38d593625 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -11082,7 +11082,7 @@ static void test_effect_properties(BOOL d3d11) UINT32 count, data; WCHAR buffer[128]; float mat[20]; - INT32 _int32; + INT32 val; CLSID clsid; BOOL cached; HRESULT hr; @@ -11181,9 +11181,9 @@ static void test_effect_properties(BOOL d3d11) ok(!wcscmp(buffer, L"Int32Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer)); prop_type = ID2D1Effect_GetType(effect, index); ok(prop_type == D2D1_PROPERTY_TYPE_INT32, "Unexpected type %u.\n", prop_type); - hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_INT32, (BYTE *)&_int32, sizeof(_int32)); + hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_INT32, (BYTE *)&val, sizeof(val)); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - ok(_int32 == -2, "Unexpected value %d.\n", _int32); + ok(val == -2, "Unexpected value %d.\n", val); /* UInt32 property. */ index = ID2D1Effect_GetPropertyIndex(effect, L"UInt32Prop");
1
0
0
0
Nikolay Sivov : wmic: Handle properly list for GET verb.
by Alexandre Julliard
05 Jul '22
05 Jul '22
Module: wine Branch: master Commit: a2f8f5f93f85a8ab162c909c720f447464820ab5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a2f8f5f93f85a8ab162c909c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Jul 4 18:41:08 2022 +0300 wmic: Handle properly list for GET verb. Instead of querying all properties and then matching to requested one, first check if all requested properties are supported by given class. Then select just that subset. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- programs/wmic/main.c | 176 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 116 insertions(+), 60 deletions(-) diff --git a/programs/wmic/main.c b/programs/wmic/main.c index 15b590098e7..cfc20e45ffd 100644 --- a/programs/wmic/main.c +++ b/programs/wmic/main.c @@ -61,34 +61,14 @@ static const WCHAR *find_class( const WCHAR *alias ) return NULL; } -static WCHAR *find_prop( IWbemClassObject *class, const WCHAR *prop ) -{ - SAFEARRAY *sa; - WCHAR *ret = NULL; - LONG i, last_index = 0; - BSTR str; - - if (IWbemClassObject_GetNames( class, NULL, WBEM_FLAG_ALWAYS, NULL, &sa ) != S_OK) return NULL; - - SafeArrayGetUBound( sa, 1, &last_index ); - for (i = 0; i <= last_index; i++) - { - SafeArrayGetElement( sa, &i, &str ); - if (!wcsicmp( str, prop )) - { - ret = wcsdup( str ); - break; - } - } - SafeArrayDestroy( sa ); - return ret; -} - static int WINAPIV output_string( HANDLE handle, const WCHAR *msg, ... ) { + BOOL output = GetStdHandle(STD_OUTPUT_HANDLE) == handle; + static const WCHAR bomW[] = {0xfeff}; + static BOOL bom; va_list va_args; int len; - DWORD count; + DWORD count, bom_count = 0; WCHAR buffer[8192]; va_start( va_args, msg ); @@ -96,9 +76,16 @@ static int WINAPIV output_string( HANDLE handle, const WCHAR *msg, ... ) va_end( va_args ); if (!WriteConsoleW( handle, buffer, len, &count, NULL )) + { + if (output && !bom) + { + WriteFile( handle, bomW, sizeof(bomW), &bom_count, FALSE ); + bom = TRUE; + } WriteFile( handle, buffer, len * sizeof(WCHAR), &count, FALSE ); + } - return count; + return count + bom_count; } static int output_error( int msg ) @@ -109,46 +96,90 @@ static int output_error( int msg ) return output_string( GetStdHandle(STD_ERROR_HANDLE), L"%s", buffer ); } -static int output_header( const WCHAR *prop, ULONG column_width ) +static int output_text( const WCHAR *str, ULONG column_width ) { - static const WCHAR bomW[] = {0xfeff}; - int len; - DWORD count; - WCHAR buffer[8192]; + return output_string( GetStdHandle(STD_OUTPUT_HANDLE), L"%-*s", column_width, str ); +} - len = swprintf( buffer, ARRAY_SIZE(buffer), L"%-*s\r\n", column_width, prop ); +static int output_newline( void ) +{ + return output_string( GetStdHandle(STD_OUTPUT_HANDLE), L"\r\n" ); +} - if (!WriteConsoleW( GetStdHandle(STD_OUTPUT_HANDLE), buffer, len, &count, NULL )) /* redirected */ +static WCHAR * strip_spaces(WCHAR *start) +{ + WCHAR *str = start, *end; + + while (*str == ' ') + str++; + + end = start + lstrlenW(start) - 1; + while (end >= start && *end == ' ') { - WriteFile( GetStdHandle(STD_OUTPUT_HANDLE), bomW, sizeof(bomW), &count, FALSE ); - WriteFile( GetStdHandle(STD_OUTPUT_HANDLE), buffer, len * sizeof(WCHAR), &count, FALSE ); - count += sizeof(bomW); + *end = '\0'; + end--; } - return count; + return str; } -static int output_line( const WCHAR *str, ULONG column_width ) +static HRESULT process_property_list( IWbemClassObject *obj, const WCHAR *proplist, WCHAR **ret ) { - return output_string( GetStdHandle(STD_OUTPUT_HANDLE), L"%-*s\r\n", column_width, str ); + WCHAR *p, *ctx, *ptr, *stripped; + HRESULT hr = S_OK; + + if (!(p = wcsdup( proplist ))) return E_OUTOFMEMORY; + + if (!(stripped = malloc( (wcslen( proplist ) + 1) * sizeof(**ret) ))) + { + free( p ); + return E_OUTOFMEMORY; + } + *stripped = 0; + + /* Validate that every requested property is supported. */ + ptr = wcstok_s( p, L",", &ctx ); + while (ptr) + { + ptr = strip_spaces( ptr ); + + if (FAILED(IWbemClassObject_Get( obj, ptr, 0, NULL, NULL, NULL ))) + { + hr = E_FAIL; + break; + } + if (*stripped) wcscat( stripped, L"," ); + wcscat( stripped, ptr ); + ptr = wcstok_s( NULL, L",", &ctx ); + } + free( p ); + + if (SUCCEEDED(hr)) + *ret = stripped; + else + { + free( stripped ); + *ret = NULL; + } + + return hr; } -static int query_prop( const WCHAR *class, const WCHAR *propname ) +static int query_prop( const WCHAR *class, const WCHAR *propnames ) { HRESULT hr; IWbemLocator *locator = NULL; IWbemServices *services = NULL; IEnumWbemClassObject *result = NULL; LONG flags = WBEM_FLAG_RETURN_IMMEDIATELY | WBEM_FLAG_FORWARD_ONLY; - BSTR path = NULL, wql = NULL, query = NULL; - WCHAR *prop = NULL; - BOOL first = TRUE; + BSTR path = NULL, wql = NULL, query = NULL, name, str = NULL; + WCHAR *proplist = NULL; int len, ret = -1; IWbemClassObject *obj; ULONG count, width = 0; VARIANT v; - WINE_TRACE("%s, %s\n", debugstr_w(class), debugstr_w(propname)); + WINE_TRACE("%s, %s\n", debugstr_w(class), debugstr_w(propnames)); CoInitialize( NULL ); CoInitializeSecurity( NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_DEFAULT, @@ -162,10 +193,27 @@ static int query_prop( const WCHAR *class, const WCHAR *propname ) hr = IWbemLocator_ConnectServer( locator, path, NULL, NULL, NULL, 0, NULL, NULL, &services ); if (hr != S_OK) goto done; - len = lstrlenW( class ) + ARRAY_SIZE(L"SELECT * FROM "); + if (!(str = SysAllocString( class ))) goto done; + hr = IWbemServices_GetObject( services, str, 0, NULL, &obj, NULL ); + SysFreeString( str ); + if (hr != S_OK) + { + WARN("Unrecognized class %s.\n", debugstr_w(class)); + goto done; + } + + /* Check that this class supports all requested properties. */ + hr = process_property_list( obj, propnames, &proplist ); + IWbemClassObject_Release( obj ); + if (FAILED(hr)) + { + output_error( STRING_INVALID_QUERY ); + goto done; + } + + len = lstrlenW( class ) + lstrlenW( proplist ) + ARRAY_SIZE(L"SELECT * FROM "); if (!(query = SysAllocStringLen( NULL, len ))) goto done; - lstrcpyW( query, L"SELECT * FROM " ); - lstrcatW( query, class ); + swprintf( query, len, L"SELECT %s FROM %s", proplist, class ); if (!(wql = SysAllocString(L"WQL" ))) goto done; hr = IWbemServices_ExecQuery( services, wql, query, flags, NULL, &result ); @@ -176,38 +224,46 @@ static int query_prop( const WCHAR *class, const WCHAR *propname ) IEnumWbemClassObject_Next( result, WBEM_INFINITE, 1, &obj, &count ); if (!count) break; - if (!prop && !(prop = find_prop( obj, propname ))) - { - output_error( STRING_INVALID_QUERY ); - goto done; - } - if (IWbemClassObject_Get( obj, prop, 0, &v, NULL, NULL ) == WBEM_S_NO_ERROR) + while (IWbemClassObject_Next( obj, 0, &name, &v, NULL, NULL ) == S_OK) { VariantChangeType( &v, &v, 0, VT_BSTR ); width = max( lstrlenW( V_BSTR( &v ) ), width ); VariantClear( &v ); + SysFreeString( name ); } + IWbemClassObject_Release( obj ); } width += 2; + /* Header */ + IEnumWbemClassObject_Reset( result ); + IEnumWbemClassObject_Next( result, WBEM_INFINITE, 1, &obj, &count ); + if (count) + { + while (IWbemClassObject_Next( obj, 0, &name, NULL, NULL, NULL ) == S_OK) + { + output_text( name, width ); + SysFreeString( name ); + } + output_newline(); + IWbemClassObject_Release( obj ); + } + + /* Values */ IEnumWbemClassObject_Reset( result ); for (;;) { IEnumWbemClassObject_Next( result, WBEM_INFINITE, 1, &obj, &count ); if (!count) break; - if (first) - { - output_header( prop, width ); - first = FALSE; - } - if (IWbemClassObject_Get( obj, prop, 0, &v, NULL, NULL ) == WBEM_S_NO_ERROR) + while (IWbemClassObject_Next( obj, 0, NULL, &v, NULL, NULL ) == S_OK) { VariantChangeType( &v, &v, 0, VT_BSTR ); - output_line( V_BSTR( &v ), width ); + output_text( V_BSTR( &v ), width ); VariantClear( &v ); } + output_newline(); IWbemClassObject_Release( obj ); } ret = 0; @@ -219,7 +275,7 @@ done: SysFreeString( path ); SysFreeString( query ); SysFreeString( wql ); - free( prop ); + free( proplist ); CoUninitialize(); return ret; }
1
0
0
0
Jan Sikorski : wined3d: Add missing copy offset in wined3d_texture_vk_upload_data().
by Alexandre Julliard
05 Jul '22
05 Jul '22
Module: wine Branch: master Commit: 4c96a51bdb423793416132430de7e02e6f76c755 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4c96a51bdb42379341613243…
Author: Jan Sikorski <jsikorski(a)codeweavers.com> Date: Tue Jul 5 12:54:21 2022 +0200 wined3d: Add missing copy offset in wined3d_texture_vk_upload_data(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53307
Signed-off-by: Jan Sikorski <jsikorski(a)codeweavers.com> --- dlls/wined3d/texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 224252c7f73..a8756f899d7 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -5014,7 +5014,7 @@ static void wined3d_texture_vk_upload_data(struct wined3d_context *context, return; } - wined3d_format_copy_data(src_format, src_bo_addr->addr, src_row_pitch, src_slice_pitch, + wined3d_format_copy_data(src_format, src_bo_addr->addr + src_offset, src_row_pitch, src_slice_pitch, map_ptr, staging_row_pitch, staging_slice_pitch, src_width, src_height, src_depth); range.offset = 0;
1
0
0
0
Alexander Wilms : ntoskrnl: Add KeQueryPriorityThread stub.
by Alexandre Julliard
05 Jul '22
05 Jul '22
Module: wine Branch: master Commit: 1a2aa0b0be155b7045a60c691cb241e4496ac29b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1a2aa0b0be155b7045a60c69…
Author: Alexander Wilms <f.alexander.wilms(a)gmail.com> Date: Sun Jul 3 14:38:49 2022 +0200 ntoskrnl: Add KeQueryPriorityThread stub. Signed-off-by: Alexander Wilms <f.alexander.wilms(a)gmail.com> --- dlls/ntoskrnl.exe/ntoskrnl.c | 9 +++++++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index f3495796e23..085d0eebaef 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2607,6 +2607,15 @@ ULONGLONG WINAPI KeQueryInterruptTime( void ) return totaltime.QuadPart; } +/*********************************************************************** + * KeQueryPriorityThread (NTOSKRNL.EXE.@) + */ +KPRIORITY WINAPI KeQueryPriorityThread( PKTHREAD Thread ) +{ + FIXME("(%p): stub.\n", Thread); + /* priority must be a value between 0 and 31 */ + return 15; +} /*********************************************************************** * KeQuerySystemTime (NTOSKRNL.EXE.@) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index 8ae4bc1f5a9..8b0ee1c4b51 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -597,7 +597,7 @@ @ stdcall KeQueryActiveProcessors() @ stdcall KeQueryActiveProcessorCountEx(long) @ stdcall KeQueryInterruptTime() -@ stub KeQueryPriorityThread +@ stdcall KeQueryPriorityThread(ptr) @ stub KeQueryRuntimeThread @ stdcall KeQuerySystemTime(ptr) @ stdcall KeQueryTickCount(ptr)
1
0
0
0
Alexandre Julliard : server: Prevent infinite symlink recursion in lookup_named_object().
by Alexandre Julliard
05 Jul '22
05 Jul '22
Module: wine Branch: master Commit: 9c551448cbfb0627abd2fdd332f511dbe2de4201 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9c551448cbfb0627abd2fdd3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 5 14:33:55 2022 +0200 server: Prevent infinite symlink recursion in lookup_named_object(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/object.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/object.c b/server/object.c index 5bb999d1fc7..333f9e7b5d6 100644 --- a/server/object.c +++ b/server/object.c @@ -233,6 +233,7 @@ static void free_object( struct object *obj ) struct object *lookup_named_object( struct object *root, const struct unicode_str *name, unsigned int attr, struct unicode_str *name_left ) { + static int recursion_count; struct object *obj, *parent; struct unicode_str name_tmp = *name, *ptr = &name_tmp; @@ -261,6 +262,13 @@ struct object *lookup_named_object( struct object *root, const struct unicode_st if (!name_tmp.len) ptr = NULL; /* special case for empty path */ + if (recursion_count > 32) + { + set_error( STATUS_INVALID_PARAMETER ); + release_object( parent ); + return NULL; + } + recursion_count++; clear_error(); while ((obj = parent->ops->lookup_name( parent, ptr, attr, root ))) @@ -269,6 +277,8 @@ struct object *lookup_named_object( struct object *root, const struct unicode_st release_object ( parent ); parent = obj; } + + recursion_count--; if (get_error()) { release_object( parent );
1
0
0
0
Alexandre Julliard : server: Avoid potential NULL dereference in create_named_object().
by Alexandre Julliard
05 Jul '22
05 Jul '22
Module: wine Branch: master Commit: 248231468d39cabcff04dd2ec57652cf3763c577 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=248231468d39cabcff04dd2e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 5 14:33:33 2022 +0200 server: Avoid potential NULL dereference in create_named_object(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/object.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/server/object.c b/server/object.c index 907bc087444..5bb999d1fc7 100644 --- a/server/object.c +++ b/server/object.c @@ -331,31 +331,31 @@ void *create_named_object( struct object *parent, const struct object_ops *ops, free_object( new_obj ); return NULL; } - goto done; } - - if (!(obj = lookup_named_object( parent, name, attributes, &new_name ))) return NULL; - - if (!new_name.len) + else { - if (attributes & OBJ_OPENIF && obj->ops == ops) - set_error( STATUS_OBJECT_NAME_EXISTS ); - else + if (!(obj = lookup_named_object( parent, name, attributes, &new_name ))) return NULL; + + if (!new_name.len) { + if (attributes & OBJ_OPENIF && obj->ops == ops) + { + set_error( STATUS_OBJECT_NAME_EXISTS ); + return obj; + } release_object( obj ); - obj = NULL; if (attributes & OBJ_OPENIF) set_error( STATUS_OBJECT_TYPE_MISMATCH ); else set_error( STATUS_OBJECT_NAME_COLLISION ); + return NULL; } - return obj; - } - new_obj = create_object( obj, ops, &new_name, attributes, sd ); - release_object( obj ); + new_obj = create_object( obj, ops, &new_name, attributes, sd ); + release_object( obj ); + if (!new_obj) return NULL; + } -done: if (attributes & OBJ_PERMANENT) { make_object_permanent( new_obj );
1
0
0
0
Alexandre Julliard : server: Return the standard status code when the key exists in NtCreateKey.
by Alexandre Julliard
05 Jul '22
05 Jul '22
Module: wine Branch: master Commit: 68a69b51bb82541f57b83e7674341a1417f1e8e5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=68a69b51bb82541f57b83e76…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 5 14:18:26 2022 +0200 server: Return the standard status code when the key exists in NtCreateKey. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/registry.c | 12 +++++++++++- include/wine/server_protocol.h | 4 ++-- server/protocol.def | 1 - server/registry.c | 10 ++++------ server/request.h | 1 - server/trace.c | 1 - 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/dlls/ntdll/unix/registry.c b/dlls/ntdll/unix/registry.c index 47547d42f09..9c98bf48399 100644 --- a/dlls/ntdll/unix/registry.c +++ b/dlls/ntdll/unix/registry.c @@ -95,10 +95,19 @@ NTSTATUS WINAPI NtCreateKey( HANDLE *key, ACCESS_MASK access, const OBJECT_ATTRI if (class) wine_server_add_data( req, class->Buffer, class->Length ); ret = wine_server_call( req ); *key = wine_server_ptr_handle( reply->hkey ); - if (dispos && !ret) *dispos = reply->created ? REG_CREATED_NEW_KEY : REG_OPENED_EXISTING_KEY; } SERVER_END_REQ; + if (ret == STATUS_OBJECT_NAME_EXISTS) + { + if (dispos) *dispos = REG_OPENED_EXISTING_KEY; + ret = STATUS_SUCCESS; + } + else if (ret == STATUS_SUCCESS) + { + if (dispos) *dispos = REG_CREATED_NEW_KEY; + } + TRACE( "<- %p\n", *key ); free( objattr ); return ret; @@ -700,6 +709,7 @@ NTSTATUS WINAPI NtLoadKey( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *fil req->file = wine_server_obj_handle( key ); wine_server_add_data( req, objattr, len ); ret = wine_server_call( req ); + if (ret == STATUS_OBJECT_NAME_EXISTS) ret = STATUS_SUCCESS; } SERVER_END_REQ; diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index ce1b2630f53..0f39333919b 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -2191,7 +2191,7 @@ struct create_key_reply { struct reply_header __header; obj_handle_t hkey; - int created; + char __pad_12[4]; }; @@ -6304,7 +6304,7 @@ union generic_reply /* ### protocol_version begin ### */ -#define SERVER_PROTOCOL_VERSION 752 +#define SERVER_PROTOCOL_VERSION 753 /* ### protocol_version end ### */ diff --git a/server/protocol.def b/server/protocol.def index a8beccaf468..6cb6275f2f2 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1718,7 +1718,6 @@ struct process_info VARARG(class,unicode_str); /* class name */ @REPLY obj_handle_t hkey; /* handle to the created key */ - int created; /* has it been newly created? */ @END /* Open a registry key */ diff --git a/server/registry.c b/server/registry.c index 70a304a4c86..d3c1e5e7ad1 100644 --- a/server/registry.c +++ b/server/registry.c @@ -803,12 +803,11 @@ static struct key *open_key( struct key *key, const struct unicode_str *name, un static struct key *create_key( struct key *key, const struct unicode_str *name, const struct unicode_str *class, unsigned int options, unsigned int access, unsigned int attributes, - const struct security_descriptor *sd, int *created ) + const struct security_descriptor *sd ) { int index; struct unicode_str token, next; - *created = 0; if (!(key = open_key_prefix( key, name, access, &token, &index ))) return NULL; if (!token.len) /* the key already exists */ @@ -827,6 +826,7 @@ static struct key *create_key( struct key *key, const struct unicode_str *name, if (debug_level > 1) dump_operation( key, NULL, "Open" ); if (key->flags & KEY_PREDEF) set_error( STATUS_PREDEFINED_HANDLE ); grab_object( key ); + set_error( STATUS_OBJECT_NAME_EXISTS ); return key; } @@ -844,7 +844,6 @@ static struct key *create_key( struct key *key, const struct unicode_str *name, set_error( STATUS_CHILD_MUST_BE_VOLATILE ); return NULL; } - *created = 1; make_dirty( key ); if (!(key = alloc_subkey( key, &token, index, current_time ))) return NULL; @@ -2212,7 +2211,7 @@ DECL_HANDLER(create_key) if ((parent = get_parent_hkey_obj( objattr->rootdir ))) { if ((key = create_key( parent, &name, &class, req->options, access, - objattr->attributes, sd, &reply->created ))) + objattr->attributes, sd ))) { reply->hkey = alloc_handle( current->process, key, access, objattr->attributes ); release_object( key ); @@ -2367,8 +2366,7 @@ DECL_HANDLER(load_registry) if ((parent = get_parent_hkey_obj( objattr->rootdir ))) { - int dummy; - if ((key = create_key( parent, &name, NULL, 0, KEY_WOW64_64KEY, 0, sd, &dummy ))) + if ((key = create_key( parent, &name, NULL, 0, KEY_WOW64_64KEY, 0, sd ))) { load_registry( key, req->file ); release_object( key ); diff --git a/server/request.h b/server/request.h index cbb4c5d7a01..dc9c4e82029 100644 --- a/server/request.h +++ b/server/request.h @@ -1174,7 +1174,6 @@ C_ASSERT( FIELD_OFFSET(struct create_key_request, access) == 12 ); C_ASSERT( FIELD_OFFSET(struct create_key_request, options) == 16 ); C_ASSERT( sizeof(struct create_key_request) == 24 ); C_ASSERT( FIELD_OFFSET(struct create_key_reply, hkey) == 8 ); -C_ASSERT( FIELD_OFFSET(struct create_key_reply, created) == 12 ); C_ASSERT( sizeof(struct create_key_reply) == 16 ); C_ASSERT( FIELD_OFFSET(struct open_key_request, parent) == 12 ); C_ASSERT( FIELD_OFFSET(struct open_key_request, access) == 16 ); diff --git a/server/trace.c b/server/trace.c index 4d4789d050a..c3dd1199f06 100644 --- a/server/trace.c +++ b/server/trace.c @@ -2295,7 +2295,6 @@ static void dump_create_key_request( const struct create_key_request *req ) static void dump_create_key_reply( const struct create_key_reply *req ) { fprintf( stderr, " hkey=%04x", req->hkey ); - fprintf( stderr, ", created=%d", req->created ); } static void dump_open_key_request( const struct open_key_request *req )
1
0
0
0
Alexandre Julliard : server: Fix access check for NtQueryKey.
by Alexandre Julliard
05 Jul '22
05 Jul '22
Module: wine Branch: master Commit: ec8edb66df7fdcfe15c5b8499b95026b9c769189 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ec8edb66df7fdcfe15c5b849…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 5 14:08:43 2022 +0200 server: Fix access check for NtQueryKey. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/reg.c | 1 - server/registry.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index e791271ed17..242a5b5e898 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -2153,7 +2153,6 @@ static void test_NtRenameKey(void) info = (KEY_NAME_INFORMATION *)buffer; status = pNtQueryKey(subkey, KeyNameInformation, info, sizeof(buffer), &size); - todo_wine ok(!status, "Unexpected status %#lx.\n", status); if (status == STATUS_SUCCESS) { diff --git a/server/registry.c b/server/registry.c index 6fe44b4351d..70a304a4c86 100644 --- a/server/registry.c +++ b/server/registry.c @@ -2272,8 +2272,7 @@ DECL_HANDLER(enum_key) { struct key *key; - if ((key = get_hkey_obj( req->hkey, - req->index == -1 ? KEY_QUERY_VALUE : KEY_ENUMERATE_SUB_KEYS ))) + if ((key = get_hkey_obj( req->hkey, req->index == -1 ? 0 : KEY_ENUMERATE_SUB_KEYS ))) { enum_key( key, req->index, req->info_class, reply ); release_object( key );
1
0
0
0
Alexandre Julliard : ntdll: Fix returned error for NtCreateKey with empty name.
by Alexandre Julliard
05 Jul '22
05 Jul '22
Module: wine Branch: master Commit: 95ddb7576d13d3b4bb1aa213a045771cb70a3d17 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=95ddb7576d13d3b4bb1aa213…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 5 14:03:34 2022 +0200 ntdll: Fix returned error for NtCreateKey with empty name. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/reg.c | 1 - dlls/ntdll/unix/registry.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index a0d07c9fc21..e791271ed17 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -603,7 +603,6 @@ static void test_NtCreateKey(void) pRtlCreateUnicodeStringFromAsciiz( &str, "" ); status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 ); - todo_wine ok( status == STATUS_OBJECT_PATH_SYNTAX_BAD, "NtCreateKey failed: 0x%08lx\n", status ); pRtlFreeUnicodeString( &str ); diff --git a/dlls/ntdll/unix/registry.c b/dlls/ntdll/unix/registry.c index 8901c350868..47547d42f09 100644 --- a/dlls/ntdll/unix/registry.c +++ b/dlls/ntdll/unix/registry.c @@ -81,6 +81,7 @@ NTSTATUS WINAPI NtCreateKey( HANDLE *key, ACCESS_MASK access, const OBJECT_ATTRI *key = 0; if (attr->Length != sizeof(OBJECT_ATTRIBUTES)) return STATUS_INVALID_PARAMETER; + if (!attr->ObjectName->Length && !attr->RootDirectory) return STATUS_OBJECT_PATH_SYNTAX_BAD; if ((ret = alloc_object_attributes( attr, &objattr, &len ))) return ret; TRACE( "(%p,%s,%s,%x,%x,%p)\n", attr->RootDirectory, debugstr_us(attr->ObjectName),
1
0
0
0
← Newer
1
...
51
52
53
54
55
56
57
...
64
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
Results per page:
10
25
50
100
200