diff --git a/patches/ntdll-CriticalSection/0002-ntdll-Add-inline-versions-of-RtlEnterCriticalSection.patch b/patches/ntdll-CriticalSection/0002-ntdll-Add-inline-versions-of-RtlEnterCriticalSection.patch index 9a817b2e..0b626cc0 100644 --- a/patches/ntdll-CriticalSection/0002-ntdll-Add-inline-versions-of-RtlEnterCriticalSection.patch +++ b/patches/ntdll-CriticalSection/0002-ntdll-Add-inline-versions-of-RtlEnterCriticalSection.patch @@ -1,4 +1,4 @@ -From 7ab8094fbbc9adb4a5406fd9a780ab5542a5a3e4 Mon Sep 17 00:00:00 2001 +From bb92d36109c9d4931051c69c0ab789b5c1396e66 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 5 Aug 2017 03:38:38 +0200 Subject: [PATCH] ntdll: Add inline versions of RtlEnterCriticalSection / @@ -9,18 +9,18 @@ Subject: [PATCH] ntdll: Add inline versions of RtlEnterCriticalSection / 1 file changed, 38 insertions(+) diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index 84866721a07..303cad1764a 100644 +index 27e7141bc65..d1fe4ba99d0 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -27,6 +27,7 @@ - #include "windef.h" +@@ -28,6 +28,7 @@ #include "winnt.h" #include "winternl.h" + #include "unixlib.h" +#include "wine/debug.h" #include "wine/server.h" #include "wine/asm.h" -@@ -214,6 +215,43 @@ extern int ntdll_wcstoumbs(DWORD flags, const WCHAR* src, int srclen, char* dst, +@@ -237,6 +238,43 @@ extern int ntdll_wcstoumbs( const WCHAR* src, DWORD srclen, char* dst, DWORD dst extern int CDECL NTDLL__vsnprintf( char *str, SIZE_T len, const char *format, __ms_va_list args ) DECLSPEC_HIDDEN; extern int CDECL NTDLL__vsnwprintf( WCHAR *str, SIZE_T len, const WCHAR *format, __ms_va_list args ) DECLSPEC_HIDDEN; @@ -65,5 +65,5 @@ index 84866721a07..303cad1764a 100644 enum loadorder -- -2.20.1 +2.26.2 diff --git a/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch b/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch index 543be2d6..0669eac8 100644 --- a/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch +++ b/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch @@ -1,4 +1,4 @@ -From d2813193e018878f99328e6a1a84a484f1ff6ac4 Mon Sep 17 00:00:00 2001 +From 875ab1e7ff6b708f15b07537a91406fe83dec681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Mon, 3 Apr 2017 05:30:27 +0200 Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data. @@ -115,10 +115,10 @@ index 5474d543248..2d382d4f326 100644 test_Loader(); } diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 38c893e3eb4..c226c467cd2 100644 +index 35dc7e1eaa4..d1e5fdeb5b8 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -122,6 +122,9 @@ static const char * const reason_names[] = +@@ -120,6 +120,9 @@ static const char * const reason_names[] = static const WCHAR dllW[] = {'.','d','l','l',0}; @@ -128,7 +128,7 @@ index 38c893e3eb4..c226c467cd2 100644 /* internal representation of 32bit modules. per process. */ typedef struct _wine_modref { -@@ -462,6 +465,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module ) +@@ -460,6 +463,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module ) } } @@ -181,7 +181,7 @@ index 38c893e3eb4..c226c467cd2 100644 /************************************************************************* * get_modref * -@@ -1227,7 +1276,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name +@@ -1225,7 +1274,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name &wm->ldr.InLoadOrderLinks); InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderLinks); @@ -194,7 +194,7 @@ index 38c893e3eb4..c226c467cd2 100644 if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT)) { -@@ -2030,6 +2084,7 @@ static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRIN +@@ -1850,6 +1904,7 @@ static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRIN /* the module has only been inserted in the load & memory order lists */ RemoveEntryList(&wm->ldr.InLoadOrderLinks); RemoveEntryList(&wm->ldr.InMemoryOrderLinks); @@ -202,7 +202,7 @@ index 38c893e3eb4..c226c467cd2 100644 /* FIXME: free the modref */ return status; } -@@ -2573,6 +2628,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam +@@ -2393,6 +2448,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam /* the module has only be inserted in the load & memory order lists */ RemoveEntryList(&wm->ldr.InLoadOrderLinks); RemoveEntryList(&wm->ldr.InMemoryOrderLinks); @@ -210,7 +210,7 @@ index 38c893e3eb4..c226c467cd2 100644 /* FIXME: there are several more dangling references * left. Including dlls loaded by this dll before the -@@ -3791,6 +3847,7 @@ static void free_modref( WINE_MODREF *wm ) +@@ -3609,6 +3665,7 @@ static void free_modref( WINE_MODREF *wm ) { RemoveEntryList(&wm->ldr.InLoadOrderLinks); RemoveEntryList(&wm->ldr.InMemoryOrderLinks); @@ -218,15 +218,15 @@ index 38c893e3eb4..c226c467cd2 100644 if (wm->ldr.InInitializationOrderLinks.Flink) RemoveEntryList(&wm->ldr.InInitializationOrderLinks); -@@ -4488,6 +4545,7 @@ void __wine_process_init(void) +@@ -4333,6 +4390,7 @@ void __wine_process_init(void) SIZE_T info_size; - TEB *teb = thread_init(); - PEB *peb = teb->Peb; + TEB *teb; + PEB *peb; + DWORD i; - /* setup the server connection */ - server_init_process(); -@@ -4510,6 +4568,10 @@ void __wine_process_init(void) + if (!unix_funcs) load_ntdll_so( ntdll_module, &__wine_spec_nt_header ); + +@@ -4360,6 +4418,10 @@ void __wine_process_init(void) load_global_options(); version_init(); @@ -236,8 +236,8 @@ index 38c893e3eb4..c226c467cd2 100644 + /* setup the load callback and create ntdll modref */ RtlInitUnicodeString( &nt_name, ntdllW ); - map_so_dll( &__wine_spec_nt_header, ntdll_module ); -@@ -4586,5 +4648,8 @@ void __wine_process_init(void) + status = build_so_dll_module( params->DllPath.Buffer, &nt_name, ntdll_module, 0, &wm ); +@@ -4435,6 +4497,9 @@ void __wine_process_init(void) teb->Tib.StackLimit = stack.StackLimit; teb->DeallocationStack = stack.DeallocationStack; @@ -246,8 +246,9 @@ index 38c893e3eb4..c226c467cd2 100644 + server_init_process_done(); } + diff --git a/include/winternl.h b/include/winternl.h -index 87d0bde2955..a6039dc2d40 100644 +index 9df1f0bb800..8625b192cf1 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -2330,8 +2330,8 @@ typedef struct _LDR_DATA_TABLE_ENTRY @@ -261,5 +262,5 @@ index 87d0bde2955..a6039dc2d40 100644 HANDLE ActivationContext; void* Lock; -- -2.26.0 +2.26.2 diff --git a/patches/ntdll-RtlIpv4StringToAddress/0001-ntdll-Implement-RtlIpv6StringToAddress-Ex-AW.patch b/patches/ntdll-RtlIpv4StringToAddress/0001-ntdll-Implement-RtlIpv6StringToAddress-Ex-AW.patch deleted file mode 100644 index 5cdda8d1..00000000 --- a/patches/ntdll-RtlIpv4StringToAddress/0001-ntdll-Implement-RtlIpv6StringToAddress-Ex-AW.patch +++ /dev/null @@ -1,291 +0,0 @@ -From 944dfc453626ecd2e8856e6122164b96636a9999 Mon Sep 17 00:00:00 2001 -From: Alex Henrie -Date: Tue, 7 Apr 2020 21:22:52 -0600 -Subject: [PATCH] ntdll: Implement RtlIpv6StringToAddress(Ex)[AW] - -Signed-off-by: Alex Henrie ---- - dlls/ntdll/ntdll.spec | 6 +- - dlls/ntdll/rtl.c | 222 +++++++++++++++++++++++++++++++++++++++--- - 2 files changed, 213 insertions(+), 15 deletions(-) - -diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index ffabd55b6dba..a88889f5d4ac 100644 ---- a/dlls/ntdll/ntdll.spec -+++ b/dlls/ntdll/ntdll.spec -@@ -782,10 +782,10 @@ - # @ stub RtlIpv6AddressToStringExA - # @ stub RtlIpv6AddressToStringExW - # @ stub RtlIpv6AddressToStringW --# @ stub RtlIpv6StringToAddressA --# @ stub RtlIpv6StringToAddressExA -+@ stdcall RtlIpv6StringToAddressA(str ptr ptr) -+@ stdcall RtlIpv6StringToAddressExA(str ptr ptr ptr) - @ stdcall RtlIpv6StringToAddressExW(wstr ptr ptr ptr) --# @ stub RtlIpv6StringToAddressW -+@ stdcall RtlIpv6StringToAddressW(wstr ptr ptr) - @ stdcall RtlIsActivationContextActive(ptr) - @ stdcall RtlIsCriticalSectionLocked(ptr) - @ stdcall RtlIsCriticalSectionLockedByThread(ptr) -diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c -index ee33e3d82b16..e3311c06ba69 100644 ---- a/dlls/ntdll/rtl.c -+++ b/dlls/ntdll/rtl.c -@@ -97,7 +97,6 @@ static const DWORD CRC_table[256] = - 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d - }; - -- - #if defined(_WIN64) && !defined(_MSC_VER) - static inline unsigned char _InterlockedCompareExchange128(__int64 *dest, __int64 xchg_high, __int64 xchg_low, __int64 *compare) - { -@@ -116,6 +115,16 @@ static inline unsigned char _InterlockedCompareExchange128(__int64 *dest, __int6 - } - #endif - -+static const int hex_table[] = { -+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x00-0x0F */ -+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x10-0x1F */ -+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x20-0x2F */ -+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, /* 0x30-0x3F */ -+ -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x40-0x4F */ -+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x50-0x5F */ -+ -1, 10, 11, 12, 13, 14, 15 /* 0x60-0x66 */ -+}; -+ - /* - * resource functions - */ -@@ -904,15 +913,6 @@ void WINAPI RtlCopyLuidAndAttributesArray( - - static BOOL parse_ipv4_component(const WCHAR **str, BOOL strict, ULONG *value) - { -- static const int hex_table[] = { -- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x00-0x0F */ -- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x10-0x1F */ -- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x20-0x2F */ -- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, /* 0x30-0x3F */ -- -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x40-0x4F */ -- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x50-0x5F */ -- -1, 10, 11, 12, 13, 14, 15 /* 0x60-0x66 */ -- }; - int base = 10, d; - WCHAR c; - ULONG cur_value, prev_value = 0; -@@ -1092,13 +1092,211 @@ NTSTATUS WINAPI RtlIpv4StringToAddressA(const char *str, BOOLEAN strict, const c - return ret; - } - -+static BOOL parse_ipv6_component(const WCHAR **str, int base, ULONG *value) -+{ -+ WCHAR *terminator; -+ if (**str >= ARRAY_SIZE(hex_table) || hex_table[**str] == -1) return FALSE; -+ *value = min(wcstoul(*str, &terminator, base), 0x7FFFFFFF); -+ if (*terminator == '0') terminator++; /* "0x" but nothing valid after */ -+ else if (terminator == *str) return FALSE; -+ *str = terminator; -+ return TRUE; -+} -+ -+static NTSTATUS ipv6_string_to_address(const WCHAR *str, BOOL ex, -+ const WCHAR **terminator, IN6_ADDR *address, ULONG *scope, USHORT *port) -+{ -+ BOOL expecting_port = FALSE, has_0x = FALSE, too_big = FALSE; -+ int n_bytes = 0, n_ipv4_bytes = 0, gap = -1; -+ ULONG ip_component, scope_component = 0, port_component = 0; -+ const WCHAR *prev_str; -+ -+ if (str[0] == '[') -+ { -+ if (!ex) goto error; -+ expecting_port = TRUE; -+ str++; -+ } -+ -+ if (str[0] == ':') -+ { -+ if (str[1] != ':') goto error; -+ str++; -+ /* Windows bug: a double colon at the beginning is treated as 4 bytes of zeros instead of 2 */ -+ address->u.Word[0] = 0; -+ n_bytes = 2; -+ } -+ -+ for (;;) -+ { -+ if (!n_ipv4_bytes && *str == ':') -+ { -+ /* double colon */ -+ if (gap != -1) goto error; -+ str++; -+ prev_str = str; -+ gap = n_bytes; -+ if (n_bytes == 14 || !parse_ipv6_component(&str, 16, &ip_component)) break; -+ str = prev_str; -+ } -+ else -+ { -+ prev_str = str; -+ } -+ -+ if (!n_ipv4_bytes && n_bytes <= (gap != -1 ? 10 : 12)) -+ { -+ if (parse_ipv6_component(&str, 10, &ip_component) && *str == '.') -+ n_ipv4_bytes = 1; -+ str = prev_str; -+ } -+ -+ if (n_ipv4_bytes) -+ { -+ /* IPv4 component */ -+ if (!parse_ipv6_component(&str, 10, &ip_component)) goto error; -+ if (str - prev_str > 3 || ip_component > 255) -+ { -+ too_big = TRUE; -+ } -+ else -+ { -+ if (*str != '.' && (n_ipv4_bytes < 4 || (n_bytes < 15 && gap == -1))) goto error; -+ address->u.Byte[n_bytes] = ip_component; -+ n_bytes++; -+ } -+ if (n_ipv4_bytes == 4 || *str != '.') break; -+ n_ipv4_bytes++; -+ } -+ else -+ { -+ /* IPv6 component */ -+ if (!parse_ipv6_component(&str, 16, &ip_component)) goto error; -+ if (prev_str[0] == '0' && (prev_str[1] == 'x' || prev_str[1] == 'X')) -+ { -+ /* Windows "feature": the last IPv6 component can start with "0x" and be longer than 4 digits */ -+ if (terminator) *terminator = prev_str + 1; /* Windows says that the "x" is the terminator */ -+ if (n_bytes < 14 && gap == -1) return STATUS_INVALID_PARAMETER; -+ address->u.Word[n_bytes/2] = htons(ip_component); -+ n_bytes += 2; -+ has_0x = TRUE; -+ goto fill_gap; -+ } -+ if (*str != ':' && n_bytes < 14 && gap == -1) goto error; -+ if (str - prev_str > 4) -+ too_big = TRUE; -+ else -+ address->u.Word[n_bytes/2] = htons(ip_component); -+ n_bytes += 2; -+ if (*str != ':' || (gap != -1 && str[1] == ':')) break; -+ } -+ if (n_bytes == (gap != -1 ? 14 : 16)) break; -+ if (too_big) return STATUS_INVALID_PARAMETER; -+ str++; -+ } -+ -+ if (terminator) *terminator = str; -+ if (too_big) return STATUS_INVALID_PARAMETER; -+ -+fill_gap: -+ if (gap == -1) -+ { -+ if (n_bytes < 16) goto error; -+ } -+ else -+ { -+ memmove(address->u.Byte + 16 - (n_bytes - gap), address->u.Byte + gap, n_bytes - gap); -+ memset(address->u.Byte + gap, 0, 16 - n_bytes); -+ } -+ -+ if (ex) -+ { -+ if (has_0x) goto error; -+ -+ if (*str == '%') -+ { -+ str++; -+ if (!parse_ipv4_component(&str, TRUE, &scope_component)) goto error; -+ } -+ -+ if (expecting_port) -+ { -+ if (*str != ']') goto error; -+ str++; -+ if (*str == ':') -+ { -+ str++; -+ if (!parse_ipv4_component(&str, FALSE, &port_component)) goto error; -+ if (!port_component || port_component > 0xFFFF || *str) goto error; -+ port_component = htons(port_component); -+ } -+ } -+ } -+ -+ if (!terminator && *str) return STATUS_INVALID_PARAMETER; -+ -+ if (scope) *scope = scope_component; -+ if (port) *port = port_component; -+ -+ return STATUS_SUCCESS; -+ -+error: -+ if (terminator) *terminator = str; -+ return STATUS_INVALID_PARAMETER; -+} -+ - /*********************************************************************** - * RtlIpv6StringToAddressExW [NTDLL.@] - */ - NTSTATUS NTAPI RtlIpv6StringToAddressExW(const WCHAR *str, IN6_ADDR *address, ULONG *scope, USHORT *port) - { -- FIXME("(%s, %p, %p, %p): stub\n", debugstr_w(str), address, scope, port); -- return STATUS_NOT_IMPLEMENTED; -+ TRACE("(%s, %p, %p, %p)\n", debugstr_w(str), address, scope, port); -+ if (!str || !address || !scope || !port) return STATUS_INVALID_PARAMETER; -+ return ipv6_string_to_address(str, TRUE, NULL, address, scope, port); -+} -+ -+/*********************************************************************** -+ * RtlIpv6StringToAddressW [NTDLL.@] -+ */ -+NTSTATUS WINAPI RtlIpv6StringToAddressW(const WCHAR *str, const WCHAR **terminator, IN6_ADDR *address) -+{ -+ TRACE("(%s, %p, %p)\n", debugstr_w(str), terminator, address); -+ return ipv6_string_to_address(str, FALSE, terminator, address, NULL, NULL); -+} -+ -+/*********************************************************************** -+ * RtlIpv6StringToAddressExA [NTDLL.@] -+ */ -+NTSTATUS WINAPI RtlIpv6StringToAddressExA(const char *str, IN6_ADDR *address, ULONG *scope, USHORT *port) -+{ -+ WCHAR wstr[64]; -+ -+ TRACE("(%s, %p, %p, %p)\n", debugstr_a(str), address, scope, port); -+ -+ if (!str || !address || !scope || !port) -+ return STATUS_INVALID_PARAMETER; -+ -+ RtlMultiByteToUnicodeN(wstr, sizeof(wstr), NULL, str, strlen(str) + 1); -+ wstr[ARRAY_SIZE(wstr) - 1] = 0; -+ return ipv6_string_to_address(wstr, TRUE, NULL, address, scope, port); -+} -+ -+/*********************************************************************** -+ * RtlIpv6StringToAddressA [NTDLL.@] -+ */ -+NTSTATUS WINAPI RtlIpv6StringToAddressA(const char *str, const char **terminator, IN6_ADDR *address) -+{ -+ WCHAR wstr[64]; -+ const WCHAR *wterminator = NULL; -+ NTSTATUS ret; -+ -+ TRACE("(%s, %p, %p)\n", debugstr_a(str), terminator, address); -+ -+ RtlMultiByteToUnicodeN(wstr, sizeof(wstr), NULL, str, strlen(str) + 1); -+ wstr[ARRAY_SIZE(wstr) - 1] = 0; -+ ret = ipv6_string_to_address(wstr, FALSE, &wterminator, address, NULL, NULL); -+ if (terminator && wterminator) *terminator = str + (wterminator - wstr); -+ return ret; - } - - /*********************************************************************** --- -2.26.2 - diff --git a/patches/ntdll-RtlIpv4StringToAddress/0002-include-Add-RtlIpv6StringToAddress-Ex-AW.patch b/patches/ntdll-RtlIpv4StringToAddress/0002-include-Add-RtlIpv6StringToAddress-Ex-AW.patch deleted file mode 100644 index 4abd3373..00000000 --- a/patches/ntdll-RtlIpv4StringToAddress/0002-include-Add-RtlIpv6StringToAddress-Ex-AW.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 62d8d5c8322be7bf07f95bca2c26057e708eff5a Mon Sep 17 00:00:00 2001 -From: Alex Henrie -Date: Mon, 27 Jan 2020 23:08:45 -0700 -Subject: [PATCH 2/5] include: Add RtlIpv6StringToAddress(Ex)[AW] - -Signed-off-by: Alex Henrie ---- - include/ip2string.h | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/include/ip2string.h b/include/ip2string.h -index 6c96c8d76d..0753ee82a9 100644 ---- a/include/ip2string.h -+++ b/include/ip2string.h -@@ -30,6 +30,13 @@ NTSTATUS WINAPI RtlIpv4StringToAddressExA(const char *str, BOOLEAN strict, IN_AD - NTSTATUS WINAPI RtlIpv4StringToAddressExW(const WCHAR *str, BOOLEAN strict, IN_ADDR *address, USHORT *port); - #define RtlIpv4StringToAddressEx WINELIB_NAME_AW(RtlIpv4StringToAddressEx) - -+NTSTATUS WINAPI RtlIpv6StringToAddressA(const char *str, const char **terminator, IN6_ADDR *address); -+NTSTATUS WINAPI RtlIpv6StringToAddressW(const WCHAR *str, const WCHAR **terminator, IN6_ADDR *address); -+#define RtlIpv6StringToAddress WINELIB_NAME_AW(RtlIpv6StringToAddress) -+NTSTATUS WINAPI RtlIpv6StringToAddressExA(const char *str, IN6_ADDR *address, ULONG *scope, USHORT *port); -+NTSTATUS WINAPI RtlIpv6StringToAddressExW(const WCHAR *str, IN6_ADDR *address, ULONG *scope, USHORT *port); -+#define RtlIpv6StringToAddressEx WINELIB_NAME_AW(RtlIpv6StringToAddressEx) -+ - #ifdef __cplusplus - } - #endif --- -2.24.1 - diff --git a/patches/ntdll-RtlIpv4StringToAddress/0003-iphlpapi-Implement-ParseNetworkString-for-IPv6-addre.patch b/patches/ntdll-RtlIpv4StringToAddress/0003-iphlpapi-Implement-ParseNetworkString-for-IPv6-addre.patch deleted file mode 100644 index 7be974e8..00000000 --- a/patches/ntdll-RtlIpv4StringToAddress/0003-iphlpapi-Implement-ParseNetworkString-for-IPv6-addre.patch +++ /dev/null @@ -1,73 +0,0 @@ -From f5b94c6bf870d8734f86d8b6062d0b51942b5c39 Mon Sep 17 00:00:00 2001 -From: Alex Henrie -Date: Mon, 27 Jan 2020 23:08:46 -0700 -Subject: [PATCH 3/5] iphlpapi: Implement ParseNetworkString for IPv6 addresses - and services - -Signed-off-by: Alex Henrie ---- - dlls/iphlpapi/iphlpapi_main.c | 38 ++++++++++++++++++++++++++++++++++- - 1 file changed, 37 insertions(+), 1 deletion(-) - -diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c -index 8c7c9018c4..0afde6e119 100644 ---- a/dlls/iphlpapi/iphlpapi_main.c -+++ b/dlls/iphlpapi/iphlpapi_main.c -@@ -3343,6 +3343,8 @@ DWORD WINAPI ParseNetworkString(const WCHAR *str, DWORD type, - NET_ADDRESS_INFO *info, USHORT *port, BYTE *prefix_len) - { - IN_ADDR temp_addr4; -+ IN6_ADDR temp_addr6; -+ ULONG temp_scope; - USHORT temp_port = 0; - NTSTATUS status; - -@@ -3383,10 +3385,44 @@ DWORD WINAPI ParseNetworkString(const WCHAR *str, DWORD type, - return ERROR_SUCCESS; - } - } -+ if (type & NET_STRING_IPV6_ADDRESS) -+ { -+ status = RtlIpv6StringToAddressExW(str, &temp_addr6, &temp_scope, &temp_port); -+ if (SUCCEEDED(status) && !temp_port) -+ { -+ if (info) -+ { -+ info->Format = NET_ADDRESS_IPV6; -+ info->u.Ipv6Address.sin6_addr = temp_addr6; -+ info->u.Ipv6Address.sin6_scope_id = temp_scope; -+ info->u.Ipv6Address.sin6_port = 0; -+ } -+ if (port) *port = 0; -+ if (prefix_len) *prefix_len = 255; -+ return ERROR_SUCCESS; -+ } -+ } -+ if (type & NET_STRING_IPV6_SERVICE) -+ { -+ status = RtlIpv6StringToAddressExW(str, &temp_addr6, &temp_scope, &temp_port); -+ if (SUCCEEDED(status) && temp_port) -+ { -+ if (info) -+ { -+ info->Format = NET_ADDRESS_IPV6; -+ info->u.Ipv6Address.sin6_addr = temp_addr6; -+ info->u.Ipv6Address.sin6_scope_id = temp_scope; -+ info->u.Ipv6Address.sin6_port = temp_port; -+ } -+ if (port) *port = ntohs(temp_port); -+ if (prefix_len) *prefix_len = 255; -+ return ERROR_SUCCESS; -+ } -+ } - - if (info) info->Format = NET_ADDRESS_FORMAT_UNSPECIFIED; - -- if (type & ~(NET_STRING_IPV4_ADDRESS|NET_STRING_IPV4_SERVICE)) -+ if (type & ~(NET_STRING_IPV4_ADDRESS|NET_STRING_IPV4_SERVICE|NET_STRING_IPV6_ADDRESS|NET_STRING_IPV6_SERVICE)) - { - FIXME("Unimplemented type 0x%x\n", type); - return ERROR_NOT_SUPPORTED; --- -2.24.1 - diff --git a/patches/ntdll-RtlIpv4StringToAddress/0004-ntdll-Add-semi-stub-for-RtlIpv6AddressToString-Ex-A.patch b/patches/ntdll-RtlIpv4StringToAddress/0004-ntdll-Add-semi-stub-for-RtlIpv6AddressToString-Ex-A.patch deleted file mode 100644 index ee21256c..00000000 --- a/patches/ntdll-RtlIpv4StringToAddress/0004-ntdll-Add-semi-stub-for-RtlIpv6AddressToString-Ex-A.patch +++ /dev/null @@ -1,410 +0,0 @@ -From 804ef82bf8b604f86662bde396b537e57e6e9ec1 Mon Sep 17 00:00:00 2001 -From: Alex Henrie -Date: Fri, 30 Aug 2019 13:43:17 -0600 -Subject: [PATCH 4/5] ntdll: Add semi-stub for RtlIpv6AddressToString(Ex)A - -All of the strings produced by the semi-stub are valid IPv6 addresses, -though not necessarily in the same format that Windows would give them -in. - -Signed-off-by: Alex Henrie ---- - dlls/ntdll/ntdll.spec | 4 +- - dlls/ntdll/rtl.c | 79 +++++++++++++++++ - dlls/ntdll/tests/rtl.c | 190 +++++++++++++++++++++-------------------- - 3 files changed, 180 insertions(+), 93 deletions(-) - -diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index bcd9950a76..ac918bfa33 100644 ---- a/dlls/ntdll/ntdll.spec -+++ b/dlls/ntdll/ntdll.spec -@@ -774,8 +774,8 @@ - @ stdcall RtlIpv4StringToAddressExA(str long ptr ptr) - @ stdcall RtlIpv4StringToAddressExW(wstr long ptr ptr) - @ stdcall RtlIpv4StringToAddressW(wstr long ptr ptr) --# @ stub RtlIpv6AddressToStringA --# @ stub RtlIpv6AddressToStringExA -+@ stdcall RtlIpv6AddressToStringA(ptr ptr) -+@ stdcall RtlIpv6AddressToStringExA(ptr long long ptr ptr) - # @ stub RtlIpv6AddressToStringExW - # @ stub RtlIpv6AddressToStringW - @ stdcall RtlIpv6StringToAddressA(str ptr ptr) -diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c -index 12c0ed430d..d2a7a6aac9 100644 ---- a/dlls/ntdll/rtl.c -+++ b/dlls/ntdll/rtl.c -@@ -1389,6 +1389,85 @@ CHAR * WINAPI RtlIpv4AddressToStringA(const IN_ADDR *pin, LPSTR buffer) - return buffer + size - 1; - } - -+/*********************************************************************** -+ * RtlIpv6AddressToStringExA [NTDLL.@] -+ */ -+NTSTATUS WINAPI RtlIpv6AddressToStringExA(const IN6_ADDR *address, ULONG scope, USHORT port, char *str, ULONG *len) -+{ -+ char buffer[64]; -+ int buffer_len; -+ NTSTATUS ret; -+ -+ FIXME("(%p %u %u %p %p): semi-stub\n", address, scope, port, str, len); -+ -+ if (!address || !str || !len) -+ return STATUS_INVALID_PARAMETER; -+ -+ if (scope && port) -+ { -+ buffer_len = sprintf(buffer, "[%x:%x:%x:%x:%x:%x:%x:%x%%%u]:%u", -+ ntohs(address->u.Word[0]), ntohs(address->u.Word[1]), -+ ntohs(address->u.Word[2]), ntohs(address->u.Word[3]), -+ ntohs(address->u.Word[4]), ntohs(address->u.Word[5]), -+ ntohs(address->u.Word[6]), ntohs(address->u.Word[7]), -+ scope, ntohs(port)); -+ } -+ else if (scope) -+ { -+ buffer_len = sprintf(buffer, "%x:%x:%x:%x:%x:%x:%x:%x%%%u", -+ ntohs(address->u.Word[0]), ntohs(address->u.Word[1]), -+ ntohs(address->u.Word[2]), ntohs(address->u.Word[3]), -+ ntohs(address->u.Word[4]), ntohs(address->u.Word[5]), -+ ntohs(address->u.Word[6]), ntohs(address->u.Word[7]), -+ scope); -+ } -+ else if (port) -+ { -+ buffer_len = sprintf(buffer, "[%x:%x:%x:%x:%x:%x:%x:%x]:%u", -+ ntohs(address->u.Word[0]), ntohs(address->u.Word[1]), -+ ntohs(address->u.Word[2]), ntohs(address->u.Word[3]), -+ ntohs(address->u.Word[4]), ntohs(address->u.Word[5]), -+ ntohs(address->u.Word[6]), ntohs(address->u.Word[7]), -+ ntohs(port)); -+ } -+ else -+ { -+ buffer_len = sprintf(buffer, "%x:%x:%x:%x:%x:%x:%x:%x", -+ ntohs(address->u.Word[0]), ntohs(address->u.Word[1]), -+ ntohs(address->u.Word[2]), ntohs(address->u.Word[3]), -+ ntohs(address->u.Word[4]), ntohs(address->u.Word[5]), -+ ntohs(address->u.Word[6]), ntohs(address->u.Word[7])); -+ } -+ buffer[buffer_len] = 0; -+ buffer_len++; -+ -+ if (buffer_len <= *len) -+ { -+ strcpy(str, buffer); -+ ret = STATUS_SUCCESS; -+ } -+ else -+ { -+ ret = STATUS_INVALID_PARAMETER; -+ } -+ -+ *len = buffer_len; -+ return ret; -+} -+ -+/*********************************************************************** -+ * RtlIpv6AddressToStringA [NTDLL.@] -+ */ -+char * WINAPI RtlIpv6AddressToStringA(const IN6_ADDR *address, char *str) -+{ -+ ULONG len = 46; -+ if (!address || !str) return str; -+ str[45] = 0; -+ if (FAILED(RtlIpv6AddressToStringExA(address, 0, 0, str, &len))) -+ return str; -+ return str + len - 1; -+} -+ - /*********************************************************************** - * get_pointer_obfuscator (internal) - */ -diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c -index e49888022f..20b7f162c2 100644 ---- a/dlls/ntdll/tests/rtl.c -+++ b/dlls/ntdll/tests/rtl.c -@@ -1775,80 +1775,81 @@ static void test_RtlIpv6AddressToString(void) - LPCSTR result; - IN6_ADDR ip; - DWORD_PTR len; -- struct -+ static const struct - { - PCSTR address; - int ip[8]; -+ BOOL todo; - } tests[] = - { - /* ipv4 addresses & ISATAP addresses */ -- { "::13.1.68.3", { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 } }, -- { "::ffff:13.1.68.3", { 0, 0, 0, 0, 0, 0xffff, 0x10d, 0x344 } }, -- { "::feff:d01:4403", { 0, 0, 0, 0, 0, 0xfffe, 0x10d, 0x344 } }, -- { "::fffe:d01:4403", { 0, 0, 0, 0, 0, 0xfeff, 0x10d, 0x344 } }, -- { "::100:d01:4403", { 0, 0, 0, 0, 0, 1, 0x10d, 0x344 } }, -- { "::1:d01:4403", { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 } }, -- { "::ffff:0:4403", { 0, 0, 0, 0, 0, 0xffff, 0, 0x344 } }, -- { "::ffff:13.1.0.0", { 0, 0, 0, 0, 0, 0xffff, 0x10d, 0 } }, -- { "::ffff:0:0", { 0, 0, 0, 0, 0, 0xffff, 0, 0 } }, -- { "::ffff:0:13.1.68.3", { 0, 0, 0, 0, 0xffff, 0, 0x10d, 0x344 } }, -- { "::ffff:ffff:d01:4403", { 0, 0, 0, 0, 0xffff, 0xffff, 0x10d, 0x344 } }, -- { "::ffff:0:0:d01:4403", { 0, 0, 0, 0xffff, 0, 0, 0x10d, 0x344 } }, -- { "::ffff:255.255.255.255", { 0, 0, 0, 0, 0, 0xffff, 0xffff, 0xffff } }, -- { "::ffff:129.144.52.38", { 0, 0, 0, 0, 0, 0xffff, 0x9081, 0x2634 } }, -- { "::5efe:129.144.52.38", { 0, 0, 0, 0, 0, 0xfe5e, 0x9081, 0x2634 } }, -- { "1111:2222:3333:4444:0:5efe:129.144.52.38", { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 } }, -- { "1111:2222:3333::5efe:129.144.52.38", { 0x1111, 0x2222, 0x3333, 0, 0, 0xfe5e, 0x9081, 0x2634 } }, -- { "1111:2222::5efe:129.144.52.38", { 0x1111, 0x2222, 0, 0, 0, 0xfe5e, 0x9081, 0x2634 } }, -- { "1111::5efe:129.144.52.38", { 0x1111, 0, 0, 0, 0, 0xfe5e, 0x9081, 0x2634 } }, -- { "::200:5efe:129.144.52.38", { 0, 0, 0, 0, 2, 0xfe5e, 0x9081, 0x2634 } }, -- { "::100:5efe:8190:3426", { 0, 0, 0, 0, 1, 0xfe5e, 0x9081, 0x2634 } }, -+ { "::13.1.68.3", { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 }, TRUE }, -+ { "::ffff:13.1.68.3", { 0, 0, 0, 0, 0, 0xffff, 0x10d, 0x344 }, TRUE }, -+ { "::feff:d01:4403", { 0, 0, 0, 0, 0, 0xfffe, 0x10d, 0x344 }, TRUE }, -+ { "::fffe:d01:4403", { 0, 0, 0, 0, 0, 0xfeff, 0x10d, 0x344 }, TRUE }, -+ { "::100:d01:4403", { 0, 0, 0, 0, 0, 1, 0x10d, 0x344 }, TRUE }, -+ { "::1:d01:4403", { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 }, TRUE }, -+ { "::ffff:0:4403", { 0, 0, 0, 0, 0, 0xffff, 0, 0x344 }, TRUE }, -+ { "::ffff:13.1.0.0", { 0, 0, 0, 0, 0, 0xffff, 0x10d, 0 }, TRUE }, -+ { "::ffff:0:0", { 0, 0, 0, 0, 0, 0xffff, 0, 0 }, TRUE }, -+ { "::ffff:0:13.1.68.3", { 0, 0, 0, 0, 0xffff, 0, 0x10d, 0x344 }, TRUE }, -+ { "::ffff:ffff:d01:4403", { 0, 0, 0, 0, 0xffff, 0xffff, 0x10d, 0x344 }, TRUE }, -+ { "::ffff:0:0:d01:4403", { 0, 0, 0, 0xffff, 0, 0, 0x10d, 0x344 }, TRUE }, -+ { "::ffff:255.255.255.255", { 0, 0, 0, 0, 0, 0xffff, 0xffff, 0xffff }, TRUE }, -+ { "::ffff:129.144.52.38", { 0, 0, 0, 0, 0, 0xffff, 0x9081, 0x2634 }, TRUE }, -+ { "::5efe:129.144.52.38", { 0, 0, 0, 0, 0, 0xfe5e, 0x9081, 0x2634 }, TRUE }, -+ { "1111:2222:3333:4444:0:5efe:129.144.52.38", { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 }, TRUE }, -+ { "1111:2222:3333::5efe:129.144.52.38", { 0x1111, 0x2222, 0x3333, 0, 0, 0xfe5e, 0x9081, 0x2634 }, TRUE }, -+ { "1111:2222::5efe:129.144.52.38", { 0x1111, 0x2222, 0, 0, 0, 0xfe5e, 0x9081, 0x2634 }, TRUE }, -+ { "1111::5efe:129.144.52.38", { 0x1111, 0, 0, 0, 0, 0xfe5e, 0x9081, 0x2634 }, TRUE }, -+ { "::200:5efe:129.144.52.38", { 0, 0, 0, 0, 2, 0xfe5e, 0x9081, 0x2634 }, TRUE }, -+ { "::100:5efe:8190:3426", { 0, 0, 0, 0, 1, 0xfe5e, 0x9081, 0x2634 }, TRUE }, - /* 'normal' addresses */ -- { "::1", { 0, 0, 0, 0, 0, 0, 0, 0x100 } }, -+ { "::1", { 0, 0, 0, 0, 0, 0, 0, 0x100 }, TRUE }, - { "0:1:2:3:4:5:6:7", { 0, 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0x700 } }, -- { "1080::8:800:200c:417a", { 0x8010, 0, 0, 0, 0x800, 0x8, 0x0c20, 0x7a41 } }, -+ { "1080::8:800:200c:417a", { 0x8010, 0, 0, 0, 0x800, 0x8, 0x0c20, 0x7a41 }, TRUE }, - { "1111:2222:3333:4444:5555:6666:7b7b:7b7b", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } }, - { "1111:2222:3333:4444:5555:6666:7777:8888", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 } }, -- { "1111:2222:3333:4444:5555:6666::", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0, 0 } }, -+ { "1111:2222:3333:4444:5555:6666::", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0, 0 }, TRUE }, - { "1111:2222:3333:4444:5555:6666:0:8888", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0, 0x8888 } }, -- { "1111:2222:3333:4444:5555::", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0, 0 } }, -+ { "1111:2222:3333:4444:5555::", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0, 0 }, TRUE }, - { "1111:2222:3333:4444:5555:0:7b7b:7b7b", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0x7b7b, 0x7b7b } }, - { "1111:2222:3333:4444:5555:0:7777:8888", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0x7777, 0x8888 } }, -- { "1111:2222:3333:4444:5555::8888", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0, 0x8888 } }, -- { "1111::", { 0x1111, 0, 0, 0, 0, 0, 0, 0 } }, -- { "1111::7b7b:7b7b", { 0x1111, 0, 0, 0, 0, 0, 0x7b7b, 0x7b7b } }, -+ { "1111:2222:3333:4444:5555::8888", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0, 0x8888 }, TRUE }, -+ { "1111::", { 0x1111, 0, 0, 0, 0, 0, 0, 0 }, TRUE }, -+ { "1111::7b7b:7b7b", { 0x1111, 0, 0, 0, 0, 0, 0x7b7b, 0x7b7b }, TRUE }, - { "1111:0:3333:4444:5555:6666:7b7b:7b7b", { 0x1111, 0, 0x3333, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } }, - { "1111:0:3333:4444:5555:6666:7777:8888", { 0x1111, 0, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 } }, -- { "1111::4444:5555:6666:7b7b:7b7b", { 0x1111, 0, 0, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } }, -- { "1111::4444:5555:6666:7777:8888", { 0x1111, 0, 0, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 } }, -- { "1111::5555:6666:7b7b:7b7b", { 0x1111, 0, 0, 0, 0x5555, 0x6666, 0x7b7b, 0x7b7b } }, -- { "1111::5555:6666:7777:8888", { 0x1111, 0, 0, 0, 0x5555, 0x6666, 0x7777, 0x8888 } }, -- { "1111::6666:7b7b:7b7b", { 0x1111, 0, 0, 0, 0, 0x6666, 0x7b7b, 0x7b7b } }, -- { "1111::6666:7777:8888", { 0x1111, 0, 0, 0, 0, 0x6666, 0x7777, 0x8888 } }, -- { "1111::7777:8888", { 0x1111, 0, 0, 0, 0, 0, 0x7777, 0x8888 } }, -- { "1111::8888", { 0x1111, 0, 0, 0, 0, 0, 0, 0x8888 } }, -+ { "1111::4444:5555:6666:7b7b:7b7b", { 0x1111, 0, 0, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b }, TRUE }, -+ { "1111::4444:5555:6666:7777:8888", { 0x1111, 0, 0, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 }, TRUE }, -+ { "1111::5555:6666:7b7b:7b7b", { 0x1111, 0, 0, 0, 0x5555, 0x6666, 0x7b7b, 0x7b7b }, TRUE }, -+ { "1111::5555:6666:7777:8888", { 0x1111, 0, 0, 0, 0x5555, 0x6666, 0x7777, 0x8888 }, TRUE }, -+ { "1111::6666:7b7b:7b7b", { 0x1111, 0, 0, 0, 0, 0x6666, 0x7b7b, 0x7b7b }, TRUE }, -+ { "1111::6666:7777:8888", { 0x1111, 0, 0, 0, 0, 0x6666, 0x7777, 0x8888 }, TRUE }, -+ { "1111::7777:8888", { 0x1111, 0, 0, 0, 0, 0, 0x7777, 0x8888 }, TRUE }, -+ { "1111::8888", { 0x1111, 0, 0, 0, 0, 0, 0, 0x8888 }, TRUE }, - { "1:2:3:4:5:6:102:304", { 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0x201, 0x403 } }, - { "1:2:3:4:5:6:7:8", { 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0x700, 0x800 } }, -- { "1:2:3:4:5:6::", { 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0, 0 } }, -+ { "1:2:3:4:5:6::", { 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0, 0 }, TRUE }, - { "1:2:3:4:5:6:0:8", { 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0, 0x800 } }, -- { "2001:0:1234::c1c0:abcd:876", { 0x120, 0, 0x3412, 0, 0, 0xc0c1, 0xcdab, 0x7608 } }, -+ { "2001:0:1234::c1c0:abcd:876", { 0x120, 0, 0x3412, 0, 0, 0xc0c1, 0xcdab, 0x7608 }, TRUE }, - { "2001:0:4136:e378:8000:63bf:3fff:fdd2", { 0x120, 0, 0x3641, 0x78e3, 0x80, 0xbf63, 0xff3f, 0xd2fd } }, -- { "2001:db8::1428:57ab", { 0x120, 0xb80d, 0, 0, 0, 0, 0x2814, 0xab57 } }, -+ { "2001:db8::1428:57ab", { 0x120, 0xb80d, 0, 0, 0, 0, 0x2814, 0xab57 }, TRUE }, - { "2001:db8:1234:ffff:ffff:ffff:ffff:ffff", { 0x120, 0xb80d, 0x3412, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff } }, - { "2001:0:ce49:7601:2cad:dfff:7c94:fffe", { 0x120, 0, 0x49ce, 0x176, 0xad2c, 0xffdf, 0x947c, 0xfeff } }, -- { "2001:db8:85a3::8a2e:370:7334", { 0x120, 0xb80d, 0xa385, 0, 0, 0x2e8a, 0x7003, 0x3473 } }, -- { "3ffe:b00::1:0:0:a", { 0xfe3f, 0xb, 0, 0, 0x100, 0, 0, 0xa00 } }, -- { "::a:b:c:d:e", { 0, 0, 0, 0xa00, 0xb00, 0xc00, 0xd00, 0xe00 } }, -- { "::123.123.123.123", { 0, 0, 0, 0, 0, 0, 0x7b7b, 0x7b7b } }, -+ { "2001:db8:85a3::8a2e:370:7334", { 0x120, 0xb80d, 0xa385, 0, 0, 0x2e8a, 0x7003, 0x3473 }, TRUE }, -+ { "3ffe:b00::1:0:0:a", { 0xfe3f, 0xb, 0, 0, 0x100, 0, 0, 0xa00 }, TRUE }, -+ { "::a:b:c:d:e", { 0, 0, 0, 0xa00, 0xb00, 0xc00, 0xd00, 0xe00 }, TRUE }, -+ { "::123.123.123.123", { 0, 0, 0, 0, 0, 0, 0x7b7b, 0x7b7b }, TRUE }, - { "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", { 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff } }, - { "1111:2222:3333:4444:5555:6666:7777:1", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x100 } }, - { "1111:2222:3333:4444:5555:6666:7777:8888", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 } }, -- { "1111:2222::", { 0x1111, 0x2222, 0, 0, 0, 0, 0, 0 } }, -- { "1111::3333:4444:5555:6666:7777", { 0x1111, 0, 0, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777 } }, -- { "1111:2222::", { 0x1111, 0x2222, 0, 0, 0, 0, 0, 0 } }, -- { "1111::3333", { 0x1111, 0, 0, 0, 0, 0, 0, 0x3333 } }, -- { "2001:0:1234::c1c0:abcd:876", { 0x120, 0, 0x3412, 0, 0, 0xc0c1, 0xcdab, 0x7608 } }, -- { "2001::ffd3", { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff } }, -+ { "1111:2222::", { 0x1111, 0x2222, 0, 0, 0, 0, 0, 0 }, TRUE }, -+ { "1111::3333:4444:5555:6666:7777", { 0x1111, 0, 0, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777 }, TRUE }, -+ { "1111:2222::", { 0x1111, 0x2222, 0, 0, 0, 0, 0, 0 }, TRUE }, -+ { "1111::3333", { 0x1111, 0, 0, 0, 0, 0, 0, 0x3333 }, TRUE }, -+ { "2001:0:1234::c1c0:abcd:876", { 0x120, 0, 0x3412, 0, 0, 0xc0c1, 0xcdab, 0x7608 }, TRUE }, -+ { "2001::ffd3", { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff }, TRUE }, - }; - unsigned int i; - -@@ -1864,10 +1865,12 @@ static void test_RtlIpv6AddressToString(void) - result = pRtlIpv6AddressToStringA(&ip, buffer); - - len = strlen(buffer); -+todo_wine - ok(result == (buffer + len) && !strcmp(buffer, "::"), - "got %p with '%s' (expected %p with '::')\n", result, buffer, buffer + len); - - result = pRtlIpv6AddressToStringA(&ip, NULL); -+todo_wine - ok(result == (LPCSTR)~0 || broken(result == (LPCSTR)len) /* WinXP / Win2k3 */, - "got %p, expected %p\n", result, (LPCSTR)~0); - -@@ -1879,6 +1882,7 @@ static void test_RtlIpv6AddressToString(void) - - result = pRtlIpv6AddressToStringA(&ip, buffer); - len = strlen(buffer); -+todo_wine_if(tests[i].todo) - ok(result == (buffer + len) && !strcmp(buffer, tests[i].address), - "got %p with '%s' (expected %p with '%s')\n", result, buffer, buffer + len, tests[i].address); - -@@ -1894,42 +1898,43 @@ static void test_RtlIpv6AddressToStringEx(void) - NTSTATUS res; - IN6_ADDR ip; - ULONG len; -- struct -+ static const struct - { - PCSTR address; - ULONG scopeid; - USHORT port; - int ip[8]; -+ BOOL todo; - } tests[] = - { - /* ipv4 addresses & ISATAP addresses */ -- { "::13.1.68.3", 0, 0, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 } }, -- { "::13.1.68.3%1", 1, 0, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 } }, -- { "::13.1.68.3%4294949819", 0xffffbbbb, 0, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 } }, -- { "[::13.1.68.3%4294949819]:65518", 0xffffbbbb, 0xeeff, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 } }, -- { "[::13.1.68.3%4294949819]:256", 0xffffbbbb, 1, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 } }, -- { "[::13.1.68.3]:256", 0, 1, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 } }, -- -- { "::1:d01:4403", 0, 0, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 } }, -- { "::1:d01:4403%1", 1, 0, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 } }, -- { "::1:d01:4403%4294949819", 0xffffbbbb, 0, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 } }, -- { "[::1:d01:4403%4294949819]:65518", 0xffffbbbb, 0xeeff, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 } }, -- { "[::1:d01:4403%4294949819]:256", 0xffffbbbb, 1, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 } }, -- { "[::1:d01:4403]:256", 0, 1, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 } }, -- -- { "1111:2222:3333:4444:0:5efe:129.144.52.38", 0, 0, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 } }, -- { "1111:2222:3333:4444:0:5efe:129.144.52.38%1", 1, 0, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 } }, -- { "1111:2222:3333:4444:0:5efe:129.144.52.38%4294949819", 0xffffbbbb, 0, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 } }, -- { "[1111:2222:3333:4444:0:5efe:129.144.52.38%4294949819]:65518",0xffffbbbb, 0xeeff, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 } }, -- { "[1111:2222:3333:4444:0:5efe:129.144.52.38%4294949819]:256", 0xffffbbbb, 1, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 } }, -- { "[1111:2222:3333:4444:0:5efe:129.144.52.38]:256", 0, 1, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 } }, -- -- { "::1", 0, 0, { 0, 0, 0, 0, 0, 0, 0, 0x100 } }, -- { "::1%1", 1, 0, { 0, 0, 0, 0, 0, 0, 0, 0x100 } }, -- { "::1%4294949819", 0xffffbbbb, 0, { 0, 0, 0, 0, 0, 0, 0, 0x100 } }, -- { "[::1%4294949819]:65518", 0xffffbbbb, 0xeeff, { 0, 0, 0, 0, 0, 0, 0, 0x100 } }, -- { "[::1%4294949819]:256", 0xffffbbbb, 1, { 0, 0, 0, 0, 0, 0, 0, 0x100 } }, -- { "[::1]:256", 0, 1, { 0, 0, 0, 0, 0, 0, 0, 0x100 } }, -+ { "::13.1.68.3", 0, 0, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 }, TRUE }, -+ { "::13.1.68.3%1", 1, 0, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 }, TRUE }, -+ { "::13.1.68.3%4294949819", 0xffffbbbb, 0, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 }, TRUE }, -+ { "[::13.1.68.3%4294949819]:65518", 0xffffbbbb, 0xeeff, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 }, TRUE }, -+ { "[::13.1.68.3%4294949819]:256", 0xffffbbbb, 1, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 }, TRUE }, -+ { "[::13.1.68.3]:256", 0, 1, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 }, TRUE }, -+ -+ { "::1:d01:4403", 0, 0, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 }, TRUE }, -+ { "::1:d01:4403%1", 1, 0, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 }, TRUE }, -+ { "::1:d01:4403%4294949819", 0xffffbbbb, 0, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 }, TRUE }, -+ { "[::1:d01:4403%4294949819]:65518", 0xffffbbbb, 0xeeff, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 }, TRUE }, -+ { "[::1:d01:4403%4294949819]:256", 0xffffbbbb, 1, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 }, TRUE }, -+ { "[::1:d01:4403]:256", 0, 1, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 }, TRUE }, -+ -+ { "1111:2222:3333:4444:0:5efe:129.144.52.38", 0, 0, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 }, TRUE }, -+ { "1111:2222:3333:4444:0:5efe:129.144.52.38%1", 1, 0, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 }, TRUE }, -+ { "1111:2222:3333:4444:0:5efe:129.144.52.38%4294949819", 0xffffbbbb, 0, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 }, TRUE }, -+ { "[1111:2222:3333:4444:0:5efe:129.144.52.38%4294949819]:65518",0xffffbbbb, 0xeeff, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 }, TRUE }, -+ { "[1111:2222:3333:4444:0:5efe:129.144.52.38%4294949819]:256", 0xffffbbbb, 1, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 }, TRUE }, -+ { "[1111:2222:3333:4444:0:5efe:129.144.52.38]:256", 0, 1, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 }, TRUE }, -+ -+ { "::1", 0, 0, { 0, 0, 0, 0, 0, 0, 0, 0x100 }, TRUE }, -+ { "::1%1", 1, 0, { 0, 0, 0, 0, 0, 0, 0, 0x100 }, TRUE }, -+ { "::1%4294949819", 0xffffbbbb, 0, { 0, 0, 0, 0, 0, 0, 0, 0x100 }, TRUE }, -+ { "[::1%4294949819]:65518", 0xffffbbbb, 0xeeff, { 0, 0, 0, 0, 0, 0, 0, 0x100 }, TRUE }, -+ { "[::1%4294949819]:256", 0xffffbbbb, 1, { 0, 0, 0, 0, 0, 0, 0, 0x100 }, TRUE }, -+ { "[::1]:256", 0, 1, { 0, 0, 0, 0, 0, 0, 0, 0x100 }, TRUE }, - - { "1111:2222:3333:4444:5555:6666:7b7b:7b7b", 0, 0, { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } }, - { "1111:2222:3333:4444:5555:6666:7b7b:7b7b%1", 1, 0, { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } }, -@@ -1938,19 +1943,19 @@ static void test_RtlIpv6AddressToStringEx(void) - { "[1111:2222:3333:4444:5555:6666:7b7b:7b7b%4294949819]:256", 0xffffbbbb, 1, { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } }, - { "[1111:2222:3333:4444:5555:6666:7b7b:7b7b]:256", 0, 1, { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } }, - -- { "1111::", 0, 0, { 0x1111, 0, 0, 0, 0, 0, 0, 0 } }, -- { "1111::%1", 1, 0, { 0x1111, 0, 0, 0, 0, 0, 0, 0 } }, -- { "1111::%4294949819", 0xffffbbbb, 0, { 0x1111, 0, 0, 0, 0, 0, 0, 0 } }, -- { "[1111::%4294949819]:65518", 0xffffbbbb, 0xeeff, { 0x1111, 0, 0, 0, 0, 0, 0, 0 } }, -- { "[1111::%4294949819]:256", 0xffffbbbb, 1, { 0x1111, 0, 0, 0, 0, 0, 0, 0 } }, -- { "[1111::]:256", 0, 1, { 0x1111, 0, 0, 0, 0, 0, 0, 0 } }, -- -- { "2001::ffd3", 0, 0, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff } }, -- { "2001::ffd3%1", 1, 0, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff } }, -- { "2001::ffd3%4294949819", 0xffffbbbb, 0, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff } }, -- { "[2001::ffd3%4294949819]:65518", 0xffffbbbb, 0xeeff, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff } }, -- { "[2001::ffd3%4294949819]:256", 0xffffbbbb, 1, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff } }, -- { "[2001::ffd3]:256", 0, 1, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff } }, -+ { "1111::", 0, 0, { 0x1111, 0, 0, 0, 0, 0, 0, 0 }, TRUE }, -+ { "1111::%1", 1, 0, { 0x1111, 0, 0, 0, 0, 0, 0, 0 }, TRUE }, -+ { "1111::%4294949819", 0xffffbbbb, 0, { 0x1111, 0, 0, 0, 0, 0, 0, 0 }, TRUE }, -+ { "[1111::%4294949819]:65518", 0xffffbbbb, 0xeeff, { 0x1111, 0, 0, 0, 0, 0, 0, 0 }, TRUE }, -+ { "[1111::%4294949819]:256", 0xffffbbbb, 1, { 0x1111, 0, 0, 0, 0, 0, 0, 0 }, TRUE }, -+ { "[1111::]:256", 0, 1, { 0x1111, 0, 0, 0, 0, 0, 0, 0 }, TRUE }, -+ -+ { "2001::ffd3", 0, 0, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff }, TRUE }, -+ { "2001::ffd3%1", 1, 0, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff }, TRUE }, -+ { "2001::ffd3%4294949819", 0xffffbbbb, 0, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff }, TRUE }, -+ { "[2001::ffd3%4294949819]:65518", 0xffffbbbb, 0xeeff, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff }, TRUE }, -+ { "[2001::ffd3%4294949819]:256", 0xffffbbbb, 1, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff }, TRUE }, -+ { "[2001::ffd3]:256", 0, 1, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff }, TRUE }, - }; - unsigned int i; - -@@ -1967,6 +1972,7 @@ static void test_RtlIpv6AddressToStringEx(void) - res = pRtlIpv6AddressToStringExA(&ip, 0, 0, buffer, &len); - - ok(res == STATUS_SUCCESS, "[validate] res = 0x%08x, expected STATUS_SUCCESS\n", res); -+todo_wine - ok(len == 3 && !strcmp(buffer, "::"), - "got len %d with '%s' (expected 3 with '::')\n", len, buffer); - -@@ -1990,6 +1996,7 @@ static void test_RtlIpv6AddressToStringEx(void) - res = pRtlIpv6AddressToStringExA(&ip, 0, 0, buffer, &len); - ok(res == STATUS_INVALID_PARAMETER, "[null length] res = 0x%08x, expected STATUS_INVALID_PARAMETER\n", res); - ok(buffer[0] == '#', "got first char %c (expected '#')\n", buffer[0]); -+todo_wine - ok(len == 3, "got len %d (expected len 3)\n", len); - - for (i = 0; i < ARRAY_SIZE(tests); i++) -@@ -2002,6 +2009,7 @@ static void test_RtlIpv6AddressToStringEx(void) - res = pRtlIpv6AddressToStringExA(&ip, tests[i].scopeid, tests[i].port, buffer, &len); - - ok(res == STATUS_SUCCESS, "[validate] res = 0x%08x, expected STATUS_SUCCESS\n", res); -+todo_wine_if(tests[i].todo) - ok(len == (strlen(tests[i].address) + 1) && !strcmp(buffer, tests[i].address), - "got len %d with '%s' (expected %d with '%s')\n", len, buffer, (int)strlen(tests[i].address), tests[i].address); - } --- -2.24.1 - diff --git a/patches/ntdll-RtlIpv4StringToAddress/0005-ntdll-Implement-RtlIpv6AddressToString-Ex-W.patch b/patches/ntdll-RtlIpv4StringToAddress/0005-ntdll-Implement-RtlIpv6AddressToString-Ex-W.patch deleted file mode 100644 index 8e87211b..00000000 --- a/patches/ntdll-RtlIpv4StringToAddress/0005-ntdll-Implement-RtlIpv6AddressToString-Ex-W.patch +++ /dev/null @@ -1,64 +0,0 @@ -From eaaefe1c916b7c66134bf0a3e37878fc9e1d7c56 Mon Sep 17 00:00:00 2001 -From: Alex Henrie -Date: Fri, 30 Aug 2019 13:43:52 -0600 -Subject: [PATCH] ntdll: Implement RtlIpv6AddressToString(Ex)W - -Signed-off-by: Alex Henrie ---- - dlls/ntdll/ntdll.spec | 4 ++-- - dlls/ntdll/rtl.c | 24 ++++++++++++++++++++++++ - 2 files changed, 26 insertions(+), 2 deletions(-) - -diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index 233ee929591..1bc39a9ee3b 100644 ---- a/dlls/ntdll/ntdll.spec -+++ b/dlls/ntdll/ntdll.spec -@@ -779,8 +779,8 @@ - @ stdcall RtlIpv4StringToAddressW(wstr long ptr ptr) - @ stdcall RtlIpv6AddressToStringA(ptr ptr) - @ stdcall RtlIpv6AddressToStringExA(ptr long long ptr ptr) --# @ stub RtlIpv6AddressToStringExW --# @ stub RtlIpv6AddressToStringW -+@ stdcall RtlIpv6AddressToStringExW(ptr long long ptr ptr) -+@ stdcall RtlIpv6AddressToStringW(ptr ptr) - @ stdcall RtlIpv6StringToAddressA(str ptr ptr) - @ stdcall RtlIpv6StringToAddressExA(str ptr ptr ptr) - @ stdcall RtlIpv6StringToAddressExW(wstr ptr ptr ptr) -diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c -index c7f9bd1e537..81deaae78d5 100644 ---- a/dlls/ntdll/rtl.c -+++ b/dlls/ntdll/rtl.c -@@ -1472,6 +1472,30 @@ char * WINAPI RtlIpv6AddressToStringA(const IN6_ADDR *address, char *str) - return str + len - 1; - } - -+/*********************************************************************** -+ * RtlIpv6AddressToStringExW [NTDLL.@] -+ */ -+NTSTATUS WINAPI RtlIpv6AddressToStringExW(const IN6_ADDR *address, ULONG scope, USHORT port, WCHAR *str, ULONG *len) -+{ -+ char cstr[64]; -+ NTSTATUS ret = RtlIpv6AddressToStringExA(address, scope, port, cstr, len); -+ if (SUCCEEDED(ret)) RtlMultiByteToUnicodeN(str, *len * sizeof(WCHAR), NULL, cstr, *len); -+ return ret; -+} -+ -+/*********************************************************************** -+ * RtlIpv6AddressToStringW [NTDLL.@] -+ */ -+WCHAR * WINAPI RtlIpv6AddressToStringW(const IN6_ADDR *address, WCHAR *str) -+{ -+ ULONG len = 46; -+ if (!address || !str) return str; -+ str[45] = 0; -+ if (FAILED(RtlIpv6AddressToStringExW(address, 0, 0, str, &len))) -+ return str; -+ return str + len - 1; -+} -+ - /*********************************************************************** - * get_pointer_obfuscator (internal) - */ --- -2.25.1 - diff --git a/patches/ntdll-RtlIpv4StringToAddress/definition b/patches/ntdll-RtlIpv4StringToAddress/definition deleted file mode 100644 index b346768a..00000000 --- a/patches/ntdll-RtlIpv4StringToAddress/definition +++ /dev/null @@ -1,4 +0,0 @@ -#Fixes: [46149] ntdll: Implement RtlIpv4StringToAddress(Ex)A/W -Fixes: [46788] ntdll: Implement RtlIpv6AddressToStringA - - diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index d7b41aca..7925e148 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "debe646aa70f88b4c4aa0dc4f380d6db939e573e" + echo "893080e4df5a45929320ebb88b8668eea316476c" } # Show version information @@ -195,7 +195,6 @@ patch_enable_all () enable_ntdll_Pipe_SpecialCharacters="$1" enable_ntdll_ProcessQuotaLimits="$1" enable_ntdll_RtlCreateUserThread="$1" - enable_ntdll_RtlIpv4StringToAddress="$1" enable_ntdll_RtlQueryPackageIdentity="$1" enable_ntdll_Serial_Port_Detection="$1" enable_ntdll_Status_Mapping="$1" @@ -690,9 +689,6 @@ patch_enable () ntdll-RtlCreateUserThread) enable_ntdll_RtlCreateUserThread="$2" ;; - ntdll-RtlIpv4StringToAddress) - enable_ntdll_RtlIpv4StringToAddress="$2" - ;; ntdll-RtlQueryPackageIdentity) enable_ntdll_RtlQueryPackageIdentity="$2" ;; @@ -4764,29 +4760,6 @@ if test "$enable_ntdll_ProcessQuotaLimits" -eq 1; then ) >> "$patchlist" fi -# Patchset ntdll-RtlIpv4StringToAddress -# | -# | This patchset fixes the following Wine bugs: -# | * [#46788] ntdll: Implement RtlIpv6AddressToStringA -# | -# | Modified files: -# | * dlls/iphlpapi/iphlpapi_main.c, dlls/ntdll/ntdll.spec, dlls/ntdll/rtl.c, dlls/ntdll/tests/rtl.c, include/ip2string.h -# | -if test "$enable_ntdll_RtlIpv4StringToAddress" -eq 1; then - patch_apply ntdll-RtlIpv4StringToAddress/0001-ntdll-Implement-RtlIpv6StringToAddress-Ex-AW.patch - patch_apply ntdll-RtlIpv4StringToAddress/0002-include-Add-RtlIpv6StringToAddress-Ex-AW.patch - patch_apply ntdll-RtlIpv4StringToAddress/0003-iphlpapi-Implement-ParseNetworkString-for-IPv6-addre.patch - patch_apply ntdll-RtlIpv4StringToAddress/0004-ntdll-Add-semi-stub-for-RtlIpv6AddressToString-Ex-A.patch - patch_apply ntdll-RtlIpv4StringToAddress/0005-ntdll-Implement-RtlIpv6AddressToString-Ex-W.patch - ( - printf '%s\n' '+ { "Alex Henrie", "ntdll: Implement RtlIpv6StringToAddress(Ex)[AW].", 1 },'; - printf '%s\n' '+ { "Alex Henrie", "include: Add RtlIpv6StringToAddress(Ex)[AW].", 1 },'; - printf '%s\n' '+ { "Alex Henrie", "iphlpapi: Implement ParseNetworkString for IPv6 addresses and services.", 1 },'; - printf '%s\n' '+ { "Alex Henrie", "ntdll: Add semi-stub for RtlIpv6AddressToString(Ex)A.", 1 },'; - printf '%s\n' '+ { "Alex Henrie", "ntdll: Implement RtlIpv6AddressToString(Ex)W.", 1 },'; - ) >> "$patchlist" -fi - # Patchset ntdll-RtlQueryPackageIdentity # | # | Modified files: diff --git a/patches/wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch b/patches/wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch index 1416842a..3e655e0c 100644 --- a/patches/wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch +++ b/patches/wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch @@ -1,4 +1,4 @@ -From aea7b0a4493b0f7cf8a9074197b3aa9a46fa4dee Mon Sep 17 00:00:00 2001 +From 68293a760784f2b4fd2fe79bbba443d76b17e11a Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 8 Aug 2018 20:00:15 -0500 Subject: [PATCH] ntdll: Add a stub implementation of Wow64Transition. @@ -9,18 +9,18 @@ Subject: [PATCH] ntdll: Add a stub implementation of Wow64Transition. 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index d32b57612d5..e2c7a3bd14f 100644 +index 6155996b7c4..0e99604eb2b 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -4490,6 +4490,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) - return TRUE; +@@ -4287,6 +4287,7 @@ NTSTATUS WINAPI NtLoadDriver( const UNICODE_STRING *DriverServiceName ) + return STATUS_NOT_IMPLEMENTED; } +void *Wow64Transition; /*********************************************************************** - * __wine_process_init -@@ -4500,12 +4501,13 @@ void __wine_process_init(void) + * NtUnloadDriver (NTDLL.@) +@@ -4345,12 +4346,13 @@ void __wine_process_init(void) static const WCHAR ntdllW[] = {'\\','?','?','\\','C',':','\\','w','i','n','d','o','w','s','\\', 's','y','s','t','e','m','3','2','\\', 'n','t','d','l','l','.','d','l','l',0}; @@ -35,7 +35,7 @@ index d32b57612d5..e2c7a3bd14f 100644 NTSTATUS status; ANSI_STRING func_name; UNICODE_STRING nt_name; -@@ -4551,6 +4553,13 @@ void __wine_process_init(void) +@@ -4400,6 +4402,13 @@ void __wine_process_init(void) MESSAGE( "wine: could not load kernel32.dll, status %x\n", status ); exit(1); } @@ -50,10 +50,10 @@ index d32b57612d5..e2c7a3bd14f 100644 if ((status = LdrGetProcedureAddress( wm->ldr.DllBase, &func_name, 0, (void **)&kernel32_start_process )) != STATUS_SUCCESS) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index c50e83b5aa7..6d9cb826624 100644 +index b97eed0bc7d..9e2f6e418eb 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec -@@ -1100,6 +1100,7 @@ +@@ -1103,6 +1103,7 @@ @ stdcall WinSqmIsOptedIn() @ stdcall WinSqmSetDWORD(ptr long long) @ stdcall WinSqmStartSession(ptr long long) @@ -62,5 +62,5 @@ index c50e83b5aa7..6d9cb826624 100644 @ stdcall -private ZwAccessCheck(ptr long long ptr ptr ptr ptr ptr) NtAccessCheck @ stdcall -private ZwAccessCheckAndAuditAlarm(ptr long ptr ptr ptr long ptr long ptr ptr ptr) NtAccessCheckAndAuditAlarm -- -2.26.0 +2.26.2