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
September 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
553 discussions
Start a n
N
ew thread
Santino Mazza : ntdll: Move NtLoadKey implementation to NtLoadKeyEx.
by Alexandre Julliard
09 Sep '22
09 Sep '22
Module: wine Branch: master Commit: 4b466805a6c63c85eaf8a8d55f91afb54ae76566 URL:
https://gitlab.winehq.org/wine/wine/-/commit/4b466805a6c63c85eaf8a8d55f91af…
Author: Santino Mazza <smazza(a)codeweavers.com> Date: Fri Aug 19 16:39:39 2022 -0300 ntdll: Move NtLoadKey implementation to NtLoadKeyEx. Signed-off-by: Santino Mazza <smazza(a)codeweavers.com> --- dlls/ntdll/unix/registry.c | 48 +++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/dlls/ntdll/unix/registry.c b/dlls/ntdll/unix/registry.c index 8af3fda7f0c..797e32a5bf1 100644 --- a/dlls/ntdll/unix/registry.c +++ b/dlls/ntdll/unix/registry.c @@ -680,6 +680,24 @@ NTSTATUS WINAPI NtFlushKey( HANDLE key ) * NtLoadKey (NTDLL.@) */ NTSTATUS WINAPI NtLoadKey( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *file ) +{ + TRACE( "(%p,%p)\n", attr, file ); + return NtLoadKeyEx( attr, file, 0, 0, 0, 0, NULL, NULL ); +} + +/****************************************************************************** + * NtLoadKey2 (NTDLL.@) + */ +NTSTATUS WINAPI NtLoadKey2( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *file, ULONG flags ) +{ + return NtLoadKeyEx( attr, file, flags, 0, 0, 0, NULL, NULL ); +} + +/****************************************************************************** + * NtLoadKeyEx (NTDLL.@) + */ +NTSTATUS WINAPI NtLoadKeyEx( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *file, ULONG flags, HANDLE trustkey, + HANDLE event, ACCESS_MASK access, HANDLE *roothandle, IO_STATUS_BLOCK *iostatus ) { NTSTATUS ret; HANDLE key; @@ -689,7 +707,14 @@ NTSTATUS WINAPI NtLoadKey( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *fil UNICODE_STRING nt_name; OBJECT_ATTRIBUTES new_attr = *file; - TRACE("(%p,%p)\n", attr, file); + TRACE( "(%p,%p,0x%x,%p,%p,0x%x,%p,%p)\n", attr, file, flags, trustkey, event, access, roothandle, iostatus ); + + if (flags) FIXME( "flags %x not handled\n", flags ); + if (trustkey) FIXME("trustkey parameter not supported\n"); + if (event) FIXME("event parameter not supported\n"); + if (access) FIXME("access parameter not supported\n"); + if (roothandle) FIXME("roothandle is not filled\n"); + if (iostatus) FIXME("iostatus is not filled\n"); get_redirect( &new_attr, &nt_name ); if (!(ret = nt_to_unix_file_name( &new_attr, &unix_name, FILE_OPEN ))) @@ -719,27 +744,6 @@ NTSTATUS WINAPI NtLoadKey( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *fil return ret; } - -/****************************************************************************** - * NtLoadKey2 (NTDLL.@) - */ -NTSTATUS WINAPI NtLoadKey2( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *file, ULONG flags ) -{ - FIXME( "(%p,%p,0x%08x) semi-stub: ignoring flags\n", attr, file, flags ); - return NtLoadKey( attr, file ); -} - -/****************************************************************************** - * NtLoadKeyEx (NTDLL.@) - */ -NTSTATUS WINAPI NtLoadKeyEx( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *file, ULONG flags, HANDLE trustkey, - HANDLE event, ACCESS_MASK access, HANDLE *roothandle, IO_STATUS_BLOCK *iostatus ) -{ - FIXME( "(%p,%p,0x%08x,%p,%p,0x%08x,%p,%p) stub\n", attr, file, flags, trustkey, event, - access, roothandle, iostatus ); - return STATUS_NOT_IMPLEMENTED; -} - /****************************************************************************** * NtUnloadKey (NTDLL.@) */
1
0
0
0
Santino Mazza : ntdll: Create NtLoadKeyEx syscall stub.
by Alexandre Julliard
09 Sep '22
09 Sep '22
Module: wine Branch: master Commit: 92b2329da9fe60d9abd709b86ef1d51ee9935d37 URL:
https://gitlab.winehq.org/wine/wine/-/commit/92b2329da9fe60d9abd709b86ef1d5…
Author: Santino Mazza <smazza(a)codeweavers.com> Date: Fri Aug 19 14:52:17 2022 -0300 ntdll: Create NtLoadKeyEx syscall stub. Signed-off-by: Santino Mazza <smazza(a)codeweavers.com> --- dlls/ntdll/ntdll.spec | 1 + dlls/ntdll/unix/loader.c | 1 + dlls/ntdll/unix/registry.c | 10 ++++++++++ dlls/wow64/registry.c | 24 ++++++++++++++++++++++++ dlls/wow64/syscall.h | 1 + include/winternl.h | 1 + 6 files changed, 38 insertions(+) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index c294490d544..7469763e7dc 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -244,6 +244,7 @@ @ stdcall -syscall NtLoadDriver(ptr) @ stdcall -syscall NtLoadKey2(ptr ptr long) @ stdcall -syscall NtLoadKey(ptr ptr) +@ stdcall -syscall NtLoadKeyEx(ptr ptr long long long long ptr ptr) @ stdcall -syscall NtLockFile(long long ptr ptr ptr ptr ptr ptr long long) # @ stub NtLockProductActivationKeys # @ stub NtLockRegistryKey diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index f58a716d08c..b78efddee1f 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -203,6 +203,7 @@ static void * const syscalls[] = NtLoadDriver, NtLoadKey, NtLoadKey2, + NtLoadKeyEx, NtLockFile, NtLockVirtualMemory, NtMakeTemporaryObject, diff --git a/dlls/ntdll/unix/registry.c b/dlls/ntdll/unix/registry.c index 693a594e84b..8af3fda7f0c 100644 --- a/dlls/ntdll/unix/registry.c +++ b/dlls/ntdll/unix/registry.c @@ -729,6 +729,16 @@ NTSTATUS WINAPI NtLoadKey2( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *fi return NtLoadKey( attr, file ); } +/****************************************************************************** + * NtLoadKeyEx (NTDLL.@) + */ +NTSTATUS WINAPI NtLoadKeyEx( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *file, ULONG flags, HANDLE trustkey, + HANDLE event, ACCESS_MASK access, HANDLE *roothandle, IO_STATUS_BLOCK *iostatus ) +{ + FIXME( "(%p,%p,0x%08x,%p,%p,0x%08x,%p,%p) stub\n", attr, file, flags, trustkey, event, + access, roothandle, iostatus ); + return STATUS_NOT_IMPLEMENTED; +} /****************************************************************************** * NtUnloadKey (NTDLL.@) diff --git a/dlls/wow64/registry.c b/dlls/wow64/registry.c index dfb75d72bc7..2d2da744479 100644 --- a/dlls/wow64/registry.c +++ b/dlls/wow64/registry.c @@ -181,6 +181,30 @@ NTSTATUS WINAPI wow64_NtLoadKey2( UINT *args ) return NtLoadKey2( objattr_32to64( &attr, attr32 ), objattr_32to64( &file, file32 ), flags ); } +/********************************************************************** + * wow64_NtLoadKeyEx + */ +NTSTATUS WINAPI wow64_NtLoadKeyEx( UINT *args ) +{ + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + OBJECT_ATTRIBUTES32 *file32 = get_ptr( &args ); + ULONG flags = get_ulong( &args ); + HANDLE trustkey = get_handle( &args ); + HANDLE event = get_handle( &args ); + ACCESS_MASK desired_access = get_ulong( &args ); + HANDLE *rootkey = get_ptr( &args ); + IO_STATUS_BLOCK32 *io32 = get_ptr( &args ); + + struct object_attr64 attr, file; + IO_STATUS_BLOCK io; + NTSTATUS status; + + status = NtLoadKeyEx( objattr_32to64( &attr, attr32 ), objattr_32to64( &file, file32 ), flags, + trustkey, event, desired_access, rootkey, iosb_32to64( &io, io32 ) ); + put_iosb( io32, &io ); + return status; +} + /********************************************************************** * wow64_NtNotifyChangeKey diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h index 65fbca89f4f..b2b1ad6c2a8 100644 --- a/dlls/wow64/syscall.h +++ b/dlls/wow64/syscall.h @@ -104,6 +104,7 @@ SYSCALL_ENTRY( NtLoadDriver ) \ SYSCALL_ENTRY( NtLoadKey ) \ SYSCALL_ENTRY( NtLoadKey2 ) \ + SYSCALL_ENTRY( NtLoadKeyEx ) \ SYSCALL_ENTRY( NtLockFile ) \ SYSCALL_ENTRY( NtLockVirtualMemory ) \ SYSCALL_ENTRY( NtMakeTemporaryObject ) \ diff --git a/include/winternl.h b/include/winternl.h index 19354dd7ffb..beb0cb7aa05 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -4024,6 +4024,7 @@ NTSYSAPI NTSTATUS WINAPI NtListenPort(HANDLE,PLPC_MESSAGE); NTSYSAPI NTSTATUS WINAPI NtLoadDriver(const UNICODE_STRING *); NTSYSAPI NTSTATUS WINAPI NtLoadKey(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *); NTSYSAPI NTSTATUS WINAPI NtLoadKey2(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *,ULONG); +NTSYSAPI NTSTATUS WINAPI NtLoadKeyEx(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *,ULONG,HANDLE,HANDLE,ACCESS_MASK,HANDLE *,IO_STATUS_BLOCK *); NTSYSAPI NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN); NTSYSAPI NTSTATUS WINAPI NtLockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG); NTSYSAPI NTSTATUS WINAPI NtMakeTemporaryObject(HANDLE);
1
0
0
0
Nikolay Sivov : ping: Use CRT allocation functions.
by Alexandre Julliard
09 Sep '22
09 Sep '22
Module: wine Branch: master Commit: ebbdbff50ea4cd00191e20f5507796eda39769b7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ebbdbff50ea4cd00191e20f5507796…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Sep 9 13:41:33 2022 +0300 ping: Use CRT allocation functions. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- programs/ping/ping_main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/programs/ping/ping_main.c b/programs/ping/ping_main.c index cf91f051a39..0615dd65054 100644 --- a/programs/ping/ping_main.c +++ b/programs/ping/ping_main.c @@ -32,7 +32,6 @@ #include <windows.h> #include "wine/debug.h" -#include "wine/heap.h" WINE_DEFAULT_DEBUG_CHANNEL(ping); @@ -164,10 +163,10 @@ int __cdecl main(int argc, char** argv) icmp_file = IcmpCreateFile(); - send_data = heap_alloc_zero(l); + send_data = calloc(1, l); reply_size = sizeof(ICMP_ECHO_REPLY) + l + 8; /* The buffer has to hold 8 more bytes of data (the size of an ICMP error message). */ - reply_buffer = heap_alloc(reply_size); + reply_buffer = malloc(reply_size); if (reply_buffer == NULL) { printf("Unable to allocate memory to reply buffer.\n"); @@ -218,6 +217,6 @@ int __cdecl main(int argc, char** argv) min, max, avg); } - heap_free(reply_buffer); + free(reply_buffer); return 0; }
1
0
0
0
Nikolay Sivov : msidb: Use CRT allocation functions.
by Alexandre Julliard
09 Sep '22
09 Sep '22
Module: wine Branch: master Commit: 470232744d664399a16604f99d912bd4f0b952a8 URL:
https://gitlab.winehq.org/wine/wine/-/commit/470232744d664399a16604f99d912b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Sep 9 13:50:18 2022 +0300 msidb: Use CRT allocation functions. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- programs/msidb/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/msidb/main.c b/programs/msidb/main.c index 2a18f855445..8570b1f9f3d 100644 --- a/programs/msidb/main.c +++ b/programs/msidb/main.c @@ -63,7 +63,7 @@ static void list_free( struct list *list ) LIST_FOR_EACH_ENTRY_SAFE( data, next, list, struct msidb_listentry, entry ) { list_remove( &data->entry ); - HeapFree( GetProcessHeap(), 0, data ); + free( data ); } } @@ -71,7 +71,7 @@ static void list_append( struct list *list, WCHAR *name ) { struct msidb_listentry *data; - data = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct msidb_listentry) ); + data = calloc( 1, sizeof(*data) ); if (!data) { ERR( "Out of memory for list.\n" ); @@ -457,14 +457,14 @@ static int import_tables( struct msidb_state *state ) DWORD len; len = lstrlenW( state->table_folder ) + 1 + lstrlenW( table_name ) + 1; /* %s/%s\0 */ - path = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); + path = malloc( len * sizeof(WCHAR) ); if (path == NULL) return 0; lstrcpyW( path, state->table_folder ); PathAddBackslashW( path ); lstrcatW( path, table_name ); handle = FindFirstFileW( path, &f ); - HeapFree( GetProcessHeap(), 0, path ); + free( path ); if (handle == INVALID_HANDLE_VALUE) return 0; do
1
0
0
0
Chris Denton : bcrypt: Add basic support for pseudo-handles.
by Alexandre Julliard
09 Sep '22
09 Sep '22
Module: wine Branch: master Commit: 5df4ff13413ab1cef0d11d8adbfb357d441aecd9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/5df4ff13413ab1cef0d11d8adbfb35…
Author: Chris Denton <christophersdenton(a)gmail.com> Date: Thu Sep 8 11:40:02 2022 +0100 bcrypt: Add basic support for pseudo-handles. Support constant values for algorithm handles in `BCryptGenRandom` and make no attempt to dereference such handles. --- dlls/bcrypt/bcrypt_main.c | 11 +++++++++++ dlls/bcrypt/tests/bcrypt.c | 8 ++++++++ include/bcrypt.h | 3 +++ 3 files changed, 22 insertions(+) diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c index 0c4c13a4c86..adf6ce144af 100644 --- a/dlls/bcrypt/bcrypt_main.c +++ b/dlls/bcrypt/bcrypt_main.c @@ -190,6 +190,17 @@ NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE handle, UCHAR *buffer, ULONG c if (!(flags & BCRYPT_USE_SYSTEM_PREFERRED_RNG)) return STATUS_INVALID_HANDLE; } + else if (((ULONG_PTR)algorithm & 1) == 1) + { + /* Pseudo algorithm handles are denoted by having the lowest bit set. + * An aligned algorithm pointer will never have this bit set. + */ + if (algorithm != BCRYPT_RNG_ALG_HANDLE) + { + FIXME("pseudo-handle algorithm %p not supported\n", algorithm); + return STATUS_NOT_IMPLEMENTED; + } + } else if (algorithm->hdr.magic != MAGIC_ALG || algorithm->id != ALG_ID_RNG) return STATUS_INVALID_HANDLE; diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c index 2af105463d4..95a09b9395f 100644 --- a/dlls/bcrypt/tests/bcrypt.c +++ b/dlls/bcrypt/tests/bcrypt.c @@ -57,6 +57,14 @@ static void test_BCryptGenRandom(void) ret = BCryptGenRandom(NULL, buffer, 8, BCRYPT_USE_SYSTEM_PREFERRED_RNG); ok(ret == STATUS_SUCCESS, "Expected success, got %#lx\n", ret); ok(memcmp(buffer, buffer + 8, 8), "Expected a random number, got 0\n"); + + /* Test pseudo handle, which was introduced at the same time as BCryptHash */ + if (pBCryptHash) + { + ret = BCryptGenRandom(BCRYPT_RNG_ALG_HANDLE, buffer, sizeof(buffer), 0); + ok(ret == STATUS_SUCCESS, "Expected success, got %#lx\n", ret); + } + else win_skip("BCryptGenRandom pseudo handles are not available\n"); } static void test_BCryptGetFipsAlgorithmMode(void) diff --git a/include/bcrypt.h b/include/bcrypt.h index c9c4cb7b1fd..de31ca358ae 100644 --- a/include/bcrypt.h +++ b/include/bcrypt.h @@ -401,6 +401,9 @@ typedef PVOID BCRYPT_HANDLE; typedef PVOID BCRYPT_HASH_HANDLE; typedef PVOID BCRYPT_SECRET_HANDLE; +/* Pseudo handles for BCryptGenRandom */ +#define BCRYPT_RNG_ALG_HANDLE ((BCRYPT_ALG_HANDLE)0x00000081) + /* Flags for BCryptGenRandom */ #define BCRYPT_RNG_USE_ENTROPY_IN_BUFFER 0x00000001 #define BCRYPT_USE_SYSTEM_PREFERRED_RNG 0x00000002
1
0
0
0
Nikolay Sivov : dwrite: Set initial justification value for default shaper.
by Alexandre Julliard
09 Sep '22
09 Sep '22
Module: wine Branch: master Commit: c8592b97e33c42196f9576233ca56bd9603b4044 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c8592b97e33c42196f9576233ca56b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Sep 9 09:10:53 2022 +0300 dwrite: Set initial justification value for default shaper. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/dwrite/shape.c | 19 +++++++++++++++++-- dlls/dwrite/shapers/arabic.c | 4 ++-- dlls/dwrite/tests/analyzer.c | 6 +++--- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/dlls/dwrite/shape.c b/dlls/dwrite/shape.c index bf80d686052..9b2d8b3f1eb 100644 --- a/dlls/dwrite/shape.c +++ b/dlls/dwrite/shape.c @@ -200,7 +200,22 @@ static void shape_merge_features(struct scriptshaping_context *context, struct s features->count = j + 1; } -static const struct shaper null_shaper; +static void default_shaper_setup_masks(struct scriptshaping_context *context, + const struct shaping_features *features) +{ + unsigned int i; + + for (i = 0; i < context->glyph_count; ++i) + { + context->u.buffer.glyph_props[i].justification = iswspace(context->glyph_infos[i].codepoint) ? + SCRIPT_JUSTIFY_BLANK : SCRIPT_JUSTIFY_CHARACTER; + } +} + +static const struct shaper default_shaper = +{ + .setup_masks = default_shaper_setup_masks +}; static void shape_set_shaper(struct scriptshaping_context *context) { @@ -211,7 +226,7 @@ static void shape_set_shaper(struct scriptshaping_context *context) context->shaper = &arabic_shaper; break; default: - context->shaper = &null_shaper; + context->shaper = &default_shaper; } } diff --git a/dlls/dwrite/shapers/arabic.c b/dlls/dwrite/shapers/arabic.c index 1319355f956..e0f49e81c27 100644 --- a/dlls/dwrite/shapers/arabic.c +++ b/dlls/dwrite/shapers/arabic.c @@ -183,6 +183,6 @@ static void arabic_setup_masks(struct scriptshaping_context *context, const struct shaper arabic_shaper = { - arabic_collect_features, - arabic_setup_masks, + .collect_features = arabic_collect_features, + .setup_masks = arabic_setup_masks, }; diff --git a/dlls/dwrite/tests/analyzer.c b/dlls/dwrite/tests/analyzer.c index 0bcfffa281b..fbe7044e402 100644 --- a/dlls/dwrite/tests/analyzer.c +++ b/dlls/dwrite/tests/analyzer.c @@ -2904,9 +2904,6 @@ static void test_glyph_justification_property(void) unsigned int i, j; HRESULT hr; - if (!strcmp(winetest_platform, "wine")) - return; - analyzer = create_text_analyzer(&IID_IDWriteTextAnalyzer); ok(!!analyzer, "Failed to create analyzer instance.\n"); @@ -2914,6 +2911,9 @@ static void test_glyph_justification_property(void) for (i = 0; i < ARRAY_SIZE(tests); ++i) { + if (tests[i].script == Script_Arabic && !strcmp(winetest_platform, "wine")) + continue; + winetest_push_context("Test %s", debugstr_w(tests[i].text)); sa.script = tests[i].script;
1
0
0
0
Alexandre Julliard : shell32: Don't return an uninitialized pointer on error in enum_trash_items().
by Alexandre Julliard
09 Sep '22
09 Sep '22
Module: wine Branch: master Commit: 33c56be5ae1cf757c1aeda0e075d63cc924f683b URL:
https://gitlab.winehq.org/wine/wine/-/commit/33c56be5ae1cf757c1aeda0e075d63…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Sep 9 16:18:00 2022 +0200 shell32: Don't return an uninitialized pointer on error in enum_trash_items(). --- dlls/shell32/recyclebin.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/shell32/recyclebin.c b/dlls/shell32/recyclebin.c index 7a03dd13a6d..cc3c6a3654c 100644 --- a/dlls/shell32/recyclebin.c +++ b/dlls/shell32/recyclebin.c @@ -392,6 +392,7 @@ static HRESULT enum_trash_items( LPITEMIDLIST **pidls, int *ret_count ) InitOnceExecuteOnce( &trash_dir_once, init_trash_dirs, NULL, NULL ); if (!trash_dir) return E_FAIL; + *pidls = NULL; file = heap_alloc( (lstrlenW(trash_dir) + lstrlenW(L"\\*") + 1) * sizeof(WCHAR) ); lstrcpyW( file, trash_dir ); lstrcatW( file, L"\\*" );
1
0
0
0
Alexandre Julliard : ntdll: Use a different alignment for initial process parameters.
by Alexandre Julliard
09 Sep '22
09 Sep '22
Module: wine Branch: master Commit: bcf52b7c64f40fc3c1700466e84905d379c0b316 URL:
https://gitlab.winehq.org/wine/wine/-/commit/bcf52b7c64f40fc3c1700466e84905…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Sep 9 15:41:14 2022 +0200 ntdll: Use a different alignment for initial process parameters. --- dlls/ntdll/env.c | 51 +++++++++++++++++++++++++------------------------- dlls/ntdll/tests/env.c | 1 - 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/dlls/ntdll/env.c b/dlls/ntdll/env.c index fa00340058b..6db6cee17cd 100644 --- a/dlls/ntdll/env.c +++ b/dlls/ntdll/env.c @@ -497,11 +497,11 @@ PRTL_USER_PROCESS_PARAMETERS WINAPI RtlDeNormalizeProcessParams( RTL_USER_PROCES } -#define ROUND_SIZE(size) (((size) + sizeof(void *) - 1) & ~(sizeof(void *) - 1)) +#define ROUND_SIZE(size,align) (((size) + (align) - 1) & ~((align) - 1)) /* append a unicode string to the process params data; helper for RtlCreateProcessParameters */ static void append_unicode_string( void **data, const UNICODE_STRING *src, - UNICODE_STRING *dst ) + UNICODE_STRING *dst, size_t align ) { dst->Length = src->Length; dst->MaximumLength = src->MaximumLength; @@ -509,12 +509,13 @@ static void append_unicode_string( void **data, const UNICODE_STRING *src, { dst->Buffer = *data; memcpy( dst->Buffer, src->Buffer, dst->Length ); - *data = (char *)dst->Buffer + ROUND_SIZE( dst->MaximumLength ); + *data = (char *)dst->Buffer + ROUND_SIZE( dst->MaximumLength, align ); } else dst->Buffer = NULL; } -static RTL_USER_PROCESS_PARAMETERS *alloc_process_params( const UNICODE_STRING *image, +static RTL_USER_PROCESS_PARAMETERS *alloc_process_params( size_t align, + const UNICODE_STRING *image, const UNICODE_STRING *dllpath, const UNICODE_STRING *curdir, const UNICODE_STRING *cmdline, @@ -531,34 +532,34 @@ static RTL_USER_PROCESS_PARAMETERS *alloc_process_params( const UNICODE_STRING * if (env) env_size = get_env_length( env ) * sizeof(WCHAR); size = (sizeof(RTL_USER_PROCESS_PARAMETERS) - + ROUND_SIZE( image->MaximumLength ) - + ROUND_SIZE( dllpath->MaximumLength ) - + ROUND_SIZE( curdir->MaximumLength ) - + ROUND_SIZE( cmdline->MaximumLength ) - + ROUND_SIZE( title->MaximumLength ) - + ROUND_SIZE( desktop->MaximumLength ) - + ROUND_SIZE( shell->MaximumLength ) - + ROUND_SIZE( runtime->MaximumLength )); - - if (!(ptr = RtlAllocateHeap( GetProcessHeap(), HEAP_ZERO_MEMORY, size + ROUND_SIZE( env_size ) ))) + + ROUND_SIZE( image->MaximumLength, align ) + + ROUND_SIZE( dllpath->MaximumLength, align ) + + ROUND_SIZE( curdir->MaximumLength, align ) + + ROUND_SIZE( cmdline->MaximumLength, align ) + + ROUND_SIZE( title->MaximumLength, align ) + + ROUND_SIZE( desktop->MaximumLength, align ) + + ROUND_SIZE( shell->MaximumLength, align ) + + ROUND_SIZE( runtime->MaximumLength, align )); + + if (!(ptr = RtlAllocateHeap( GetProcessHeap(), HEAP_ZERO_MEMORY, size + ROUND_SIZE( env_size, align )))) return NULL; params = ptr; params->AllocationSize = size; params->Size = size; params->Flags = PROCESS_PARAMS_FLAG_NORMALIZED; - params->EnvironmentSize = ROUND_SIZE( env_size ); + params->EnvironmentSize = ROUND_SIZE( env_size, align ); /* all other fields are zero */ ptr = params + 1; - append_unicode_string( &ptr, curdir, ¶ms->CurrentDirectory.DosPath ); - append_unicode_string( &ptr, dllpath, ¶ms->DllPath ); - append_unicode_string( &ptr, image, ¶ms->ImagePathName ); - append_unicode_string( &ptr, cmdline, ¶ms->CommandLine ); - append_unicode_string( &ptr, title, ¶ms->WindowTitle ); - append_unicode_string( &ptr, desktop, ¶ms->Desktop ); - append_unicode_string( &ptr, shell, ¶ms->ShellInfo ); - append_unicode_string( &ptr, runtime, ¶ms->RuntimeInfo ); + append_unicode_string( &ptr, curdir, ¶ms->CurrentDirectory.DosPath, align ); + append_unicode_string( &ptr, dllpath, ¶ms->DllPath, align ); + append_unicode_string( &ptr, image, ¶ms->ImagePathName, align ); + append_unicode_string( &ptr, cmdline, ¶ms->CommandLine, align ); + append_unicode_string( &ptr, title, ¶ms->WindowTitle, align ); + append_unicode_string( &ptr, desktop, ¶ms->Desktop, align ); + append_unicode_string( &ptr, shell, ¶ms->ShellInfo, align ); + append_unicode_string( &ptr, runtime, ¶ms->RuntimeInfo, align ); if (env) params->Environment = memcpy( ptr, env, env_size ); return params; } @@ -603,7 +604,7 @@ NTSTATUS WINAPI RtlCreateProcessParametersEx( RTL_USER_PROCESS_PARAMETERS **resu if (!ShellInfo) ShellInfo = &empty_str; if (!RuntimeInfo) RuntimeInfo = &null_str; - if ((*result = alloc_process_params( ImagePathName, DllPath, &curdir, CommandLine, + if ((*result = alloc_process_params( sizeof(void *), ImagePathName, DllPath, &curdir, CommandLine, Environment, WindowTitle, Desktop, ShellInfo, RuntimeInfo ))) { if (cur_params) (*result)->ConsoleFlags = cur_params->ConsoleFlags; @@ -664,7 +665,7 @@ void init_user_process_params(void) else env[0] = 0; } - if (!(new_params = alloc_process_params( ¶ms->ImagePathName, ¶ms->DllPath, + if (!(new_params = alloc_process_params( 1, ¶ms->ImagePathName, ¶ms->DllPath, ¶ms->CurrentDirectory.DosPath, ¶ms->CommandLine, NULL, ¶ms->WindowTitle, ¶ms->Desktop, ¶ms->ShellInfo, ¶ms->RuntimeInfo ))) diff --git a/dlls/ntdll/tests/env.c b/dlls/ntdll/tests/env.c index a6bdd402393..33a6eb277bf 100644 --- a/dlls/ntdll/tests/env.c +++ b/dlls/ntdll/tests/env.c @@ -274,7 +274,6 @@ static UINT_PTR check_string_( int line, RTL_USER_PROCESS_PARAMETERS *params, UN ok_(__FILE__,line)( (UINT_PTR)str->Buffer == align(pos, sizeof(void *)), "wrong buffer %Ix/%Ix\n", (UINT_PTR)str->Buffer, pos ); else /* initial params are not aligned */ - todo_wine_if ((UINT_PTR)str->Buffer != pos) ok_(__FILE__,line)( (UINT_PTR)str->Buffer == pos, "wrong buffer %Ix/%Ix\n", (UINT_PTR)str->Buffer, pos ); if (str->Length < str->MaximumLength)
1
0
0
0
Alexandre Julliard : ntdll: Add a helper function to allocate process parameters.
by Alexandre Julliard
09 Sep '22
09 Sep '22
Module: wine Branch: master Commit: 3a49b5d77d259170cdc1b2ad42f8f01ecdd112c4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/3a49b5d77d259170cdc1b2ad42f8f0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Sep 9 15:28:14 2022 +0200 ntdll: Add a helper function to allocate process parameters. --- dlls/ntdll/env.c | 98 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 41 deletions(-) diff --git a/dlls/ntdll/env.c b/dlls/ntdll/env.c index bb8931a556b..fa00340058b 100644 --- a/dlls/ntdll/env.c +++ b/dlls/ntdll/env.c @@ -514,6 +514,55 @@ static void append_unicode_string( void **data, const UNICODE_STRING *src, else dst->Buffer = NULL; } +static RTL_USER_PROCESS_PARAMETERS *alloc_process_params( const UNICODE_STRING *image, + const UNICODE_STRING *dllpath, + const UNICODE_STRING *curdir, + const UNICODE_STRING *cmdline, + const WCHAR *env, + const UNICODE_STRING *title, + const UNICODE_STRING *desktop, + const UNICODE_STRING *shell, + const UNICODE_STRING *runtime ) +{ + RTL_USER_PROCESS_PARAMETERS *params; + SIZE_T size, env_size = 0; + void *ptr; + + if (env) env_size = get_env_length( env ) * sizeof(WCHAR); + + size = (sizeof(RTL_USER_PROCESS_PARAMETERS) + + ROUND_SIZE( image->MaximumLength ) + + ROUND_SIZE( dllpath->MaximumLength ) + + ROUND_SIZE( curdir->MaximumLength ) + + ROUND_SIZE( cmdline->MaximumLength ) + + ROUND_SIZE( title->MaximumLength ) + + ROUND_SIZE( desktop->MaximumLength ) + + ROUND_SIZE( shell->MaximumLength ) + + ROUND_SIZE( runtime->MaximumLength )); + + if (!(ptr = RtlAllocateHeap( GetProcessHeap(), HEAP_ZERO_MEMORY, size + ROUND_SIZE( env_size ) ))) + return NULL; + + params = ptr; + params->AllocationSize = size; + params->Size = size; + params->Flags = PROCESS_PARAMS_FLAG_NORMALIZED; + params->EnvironmentSize = ROUND_SIZE( env_size ); + /* all other fields are zero */ + + ptr = params + 1; + append_unicode_string( &ptr, curdir, ¶ms->CurrentDirectory.DosPath ); + append_unicode_string( &ptr, dllpath, ¶ms->DllPath ); + append_unicode_string( &ptr, image, ¶ms->ImagePathName ); + append_unicode_string( &ptr, cmdline, ¶ms->CommandLine ); + append_unicode_string( &ptr, title, ¶ms->WindowTitle ); + append_unicode_string( &ptr, desktop, ¶ms->Desktop ); + append_unicode_string( &ptr, shell, ¶ms->ShellInfo ); + append_unicode_string( &ptr, runtime, ¶ms->RuntimeInfo ); + if (env) params->Environment = memcpy( ptr, env, env_size ); + return params; +} + /****************************************************************************** * RtlCreateProcessParametersEx [NTDLL.@] @@ -532,8 +581,6 @@ NTSTATUS WINAPI RtlCreateProcessParametersEx( RTL_USER_PROCESS_PARAMETERS **resu { UNICODE_STRING curdir; const RTL_USER_PROCESS_PARAMETERS *cur_params; - SIZE_T size, env_size = 0; - void *ptr; NTSTATUS status = STATUS_SUCCESS; RtlAcquirePebLock(); @@ -556,40 +603,11 @@ NTSTATUS WINAPI RtlCreateProcessParametersEx( RTL_USER_PROCESS_PARAMETERS **resu if (!ShellInfo) ShellInfo = &empty_str; if (!RuntimeInfo) RuntimeInfo = &null_str; - if (Environment) env_size = get_env_length( Environment ) * sizeof(WCHAR); - - size = (sizeof(RTL_USER_PROCESS_PARAMETERS) - + ROUND_SIZE( ImagePathName->MaximumLength ) - + ROUND_SIZE( DllPath->MaximumLength ) - + ROUND_SIZE( curdir.MaximumLength ) - + ROUND_SIZE( CommandLine->MaximumLength ) - + ROUND_SIZE( WindowTitle->MaximumLength ) - + ROUND_SIZE( Desktop->MaximumLength ) - + ROUND_SIZE( ShellInfo->MaximumLength ) - + ROUND_SIZE( RuntimeInfo->MaximumLength )); - - if ((ptr = RtlAllocateHeap( GetProcessHeap(), HEAP_ZERO_MEMORY, size + ROUND_SIZE( env_size ) ))) + if ((*result = alloc_process_params( ImagePathName, DllPath, &curdir, CommandLine, + Environment, WindowTitle, Desktop, ShellInfo, RuntimeInfo ))) { - RTL_USER_PROCESS_PARAMETERS *params = ptr; - params->AllocationSize = size; - params->Size = size; - params->Flags = PROCESS_PARAMS_FLAG_NORMALIZED; - params->EnvironmentSize = ROUND_SIZE( env_size ); - if (cur_params) params->ConsoleFlags = cur_params->ConsoleFlags; - /* all other fields are zero */ - - ptr = params + 1; - append_unicode_string( &ptr, &curdir, ¶ms->CurrentDirectory.DosPath ); - append_unicode_string( &ptr, DllPath, ¶ms->DllPath ); - append_unicode_string( &ptr, ImagePathName, ¶ms->ImagePathName ); - append_unicode_string( &ptr, CommandLine, ¶ms->CommandLine ); - append_unicode_string( &ptr, WindowTitle, ¶ms->WindowTitle ); - append_unicode_string( &ptr, Desktop, ¶ms->Desktop ); - append_unicode_string( &ptr, ShellInfo, ¶ms->ShellInfo ); - append_unicode_string( &ptr, RuntimeInfo, ¶ms->RuntimeInfo ); - if (Environment) params->Environment = memcpy( ptr, Environment, env_size ); - *result = params; - if (!(flags & PROCESS_PARAMS_FLAG_NORMALIZED)) RtlDeNormalizeProcessParams( params ); + if (cur_params) (*result)->ConsoleFlags = cur_params->ConsoleFlags; + if (!(flags & PROCESS_PARAMS_FLAG_NORMALIZED)) RtlDeNormalizeProcessParams( *result ); } else status = STATUS_NO_MEMORY; @@ -646,12 +664,10 @@ void init_user_process_params(void) else env[0] = 0; } - params->Environment = NULL; /* avoid copying it */ - if (RtlCreateProcessParametersEx( &new_params, ¶ms->ImagePathName, ¶ms->DllPath, - ¶ms->CurrentDirectory.DosPath, - ¶ms->CommandLine, NULL, ¶ms->WindowTitle, ¶ms->Desktop, - ¶ms->ShellInfo, ¶ms->RuntimeInfo, - PROCESS_PARAMS_FLAG_NORMALIZED )) + if (!(new_params = alloc_process_params( ¶ms->ImagePathName, ¶ms->DllPath, + ¶ms->CurrentDirectory.DosPath, ¶ms->CommandLine, + NULL, ¶ms->WindowTitle, ¶ms->Desktop, + ¶ms->ShellInfo, ¶ms->RuntimeInfo ))) return; new_params->Environment = env;
1
0
0
0
Alexandre Julliard : ntdll/tests: Remove workarounds for old Windows versions.
by Alexandre Julliard
09 Sep '22
09 Sep '22
Module: wine Branch: master Commit: 5d99b2a32c2d679aa2bc47ef6e087aeb29a33e5f URL:
https://gitlab.winehq.org/wine/wine/-/commit/5d99b2a32c2d679aa2bc47ef6e087a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Sep 9 15:10:57 2022 +0200 ntdll/tests: Remove workarounds for old Windows versions. --- dlls/ntdll/tests/env.c | 134 ++++++++++++++++--------------------------------- 1 file changed, 43 insertions(+), 91 deletions(-)
1
0
0
0
← Newer
1
...
39
40
41
42
43
44
45
...
56
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
Results per page:
10
25
50
100
200