diff --git a/patches/directmanipulation-new-dll/0002-directmanipulation-New-dll.patch b/patches/directmanipulation-new-dll/0002-directmanipulation-New-dll.patch index 0ca8b28b..be9cd010 100644 --- a/patches/directmanipulation-new-dll/0002-directmanipulation-New-dll.patch +++ b/patches/directmanipulation-new-dll/0002-directmanipulation-New-dll.patch @@ -1,71 +1,32 @@ -From 3c3fd497486e624cbc8ab3a98e2fd02cdf6dc2ba Mon Sep 17 00:00:00 2001 +From f40642800ca04184680656f05410684b5c5bf003 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes -Date: Wed, 17 Jul 2019 09:26:16 +1000 -Subject: [PATCH 2/6] directmanipulation: New dll +Date: Fri, 12 Jun 2020 16:43:06 -0500 +Subject: [PATCH] directmanipulation: New dll Signed-off-by: Alistair Leslie-Hughes --- - configure | 2 + - configure.ac | 1 + - dlls/directmanipulation/Makefile.in | 8 +++ - dlls/directmanipulation/directmanip.idl | 38 +++++++++++ - dlls/directmanipulation/directmanipulation.c | 67 +++++++++++++++++++ - .../directmanipulation.spec | 6 ++ - 6 files changed, 122 insertions(+) - create mode 100644 dlls/directmanipulation/Makefile.in + dlls/directmanipulation/Makefile.in | 2 + + dlls/directmanipulation/directmanip.idl | 38 +++++++++++++++++++ + dlls/directmanipulation/directmanipulation.c | 12 ++++++ + .../directmanipulation.spec | 4 +- + 4 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 dlls/directmanipulation/directmanip.idl - create mode 100644 dlls/directmanipulation/directmanipulation.c - create mode 100644 dlls/directmanipulation/directmanipulation.spec -diff --git a/configure b/configure -index f1de2c4052..bc376a6686 100755 ---- a/configure -+++ b/configure -@@ -1231,6 +1231,7 @@ enable_dhtmled_ocx - enable_difxapi - enable_dinput - enable_dinput8 -+enable_directmanipulation - enable_dispex - enable_dmband - enable_dmcompos -@@ -20162,6 +20163,7 @@ wine_fn_config_makefile dlls/dinput enable_dinput - wine_fn_config_makefile dlls/dinput/tests enable_tests - wine_fn_config_makefile dlls/dinput8 enable_dinput8 - wine_fn_config_makefile dlls/dinput8/tests enable_tests -+wine_fn_config_makefile dlls/directmanipulation enable_directmanipulation - wine_fn_config_makefile dlls/dispdib.dll16 enable_win16 - wine_fn_config_makefile dlls/dispex enable_dispex - wine_fn_config_makefile dlls/dispex/tests enable_tests -diff --git a/configure.ac b/configure.ac -index a7c45ace73..51519fdd9b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3148,6 +3148,7 @@ WINE_CONFIG_MAKEFILE(dlls/dinput) - WINE_CONFIG_MAKEFILE(dlls/dinput/tests) - WINE_CONFIG_MAKEFILE(dlls/dinput8) - WINE_CONFIG_MAKEFILE(dlls/dinput8/tests) -+WINE_CONFIG_MAKEFILE(dlls/directmanipulation) - WINE_CONFIG_MAKEFILE(dlls/dispdib.dll16,enable_win16) - WINE_CONFIG_MAKEFILE(dlls/dispex) - WINE_CONFIG_MAKEFILE(dlls/dispex/tests) diff --git a/dlls/directmanipulation/Makefile.in b/dlls/directmanipulation/Makefile.in -new file mode 100644 -index 0000000000..331c2a8420 ---- /dev/null +index d09d652b61a..331c2a84205 100644 +--- a/dlls/directmanipulation/Makefile.in +++ b/dlls/directmanipulation/Makefile.in -@@ -0,0 +1,8 @@ -+MODULE = directmanipulation.dll -+ -+EXTRADLLFLAGS = -mno-cygwin -+ +@@ -2,5 +2,7 @@ MODULE = directmanipulation.dll + + EXTRADLLFLAGS = -mno-cygwin + +IDL_SRCS = directmanip.idl + -+C_SRCS = \ -+ directmanipulation.c + C_SRCS = \ + directmanipulation.c diff --git a/dlls/directmanipulation/directmanip.idl b/dlls/directmanipulation/directmanip.idl new file mode 100644 -index 0000000000..ff00668ba5 +index 00000000000..ff00668ba5b --- /dev/null +++ b/dlls/directmanipulation/directmanip.idl @@ -0,0 +1,38 @@ @@ -108,58 +69,22 @@ index 0000000000..ff00668ba5 + [default] interface IDirectManipulationManager; +} diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c -new file mode 100644 -index 0000000000..136b2976a4 ---- /dev/null +index 21458ba1fe7..f808bc1a331 100644 +--- a/dlls/directmanipulation/directmanipulation.c +++ b/dlls/directmanipulation/directmanipulation.c -@@ -0,0 +1,67 @@ -+/* -+ * Copyright 2019 Alistair Leslie-Hughes -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA -+ */ -+ -+#include -+ -+#include "windef.h" -+#include "winbase.h" +@@ -20,6 +20,8 @@ + + #include "windef.h" + #include "winbase.h" +#include "oleidl.h" +#include "rpcproxy.h" -+#include "wine/debug.h" -+ -+WINE_DEFAULT_DEBUG_CHANNEL(manipulation); -+ -+static HINSTANCE dm_instance; -+ -+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) -+{ -+ TRACE("(%p, %u, %p)\n", instance, reason, reserved); -+ -+ switch (reason) -+ { -+ case DLL_WINE_PREATTACH: -+ return FALSE; /* prefer native version */ -+ case DLL_PROCESS_ATTACH: -+ dm_instance = instance; -+ DisableThreadLibraryCalls(instance); -+ break; -+ } -+ -+ return TRUE; -+} -+ + #include "wine/debug.h" + + WINE_DEFAULT_DEBUG_CHANNEL(manipulation); +@@ -43,6 +45,16 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) + return TRUE; + } + +HRESULT WINAPI DllRegisterServer(void) +{ + return __wine_register_resources( dm_instance ); @@ -170,29 +95,21 @@ index 0000000000..136b2976a4 + return __wine_unregister_resources( dm_instance ); +} + -+HRESULT WINAPI DllCanUnloadNow(void) -+{ -+ return S_FALSE; -+} -+ -+HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) -+{ -+ FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); -+ return CLASS_E_CLASSNOTAVAILABLE; -+} -\ No newline at end of file + HRESULT WINAPI DllCanUnloadNow(void) + { + return S_FALSE; diff --git a/dlls/directmanipulation/directmanipulation.spec b/dlls/directmanipulation/directmanipulation.spec -new file mode 100644 -index 0000000000..3f0004daeb ---- /dev/null +index 6c8a107d5c7..3f0004daebe 100644 +--- a/dlls/directmanipulation/directmanipulation.spec +++ b/dlls/directmanipulation/directmanipulation.spec -@@ -0,0 +1,6 @@ -+@ stub InitializeDManipHook -+@ stdcall -private DllCanUnloadNow() -+@ stub DllGetActivationFactory -+@ stdcall -private DllGetClassObject(ptr ptr ptr) +@@ -2,5 +2,5 @@ + @ stdcall -private DllCanUnloadNow() + @ stub DllGetActivationFactory + @ stdcall -private DllGetClassObject(ptr ptr ptr) +-@ stub DllRegisterServer() +-@ stub DllUnregisterServer() +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() -- -2.17.1 +2.27.0 diff --git a/patches/directmanipulation-new-dll/0004-directmanipulation-Create-DirectManipulationManager-.patch b/patches/directmanipulation-new-dll/0004-directmanipulation-Create-DirectManipulationManager-.patch index 037be1c1..fed53497 100644 --- a/patches/directmanipulation-new-dll/0004-directmanipulation-Create-DirectManipulationManager-.patch +++ b/patches/directmanipulation-new-dll/0004-directmanipulation-Create-DirectManipulationManager-.patch @@ -1,18 +1,18 @@ -From d7ab064f1040d0031a0f277f16d2ef7bfe5b1944 Mon Sep 17 00:00:00 2001 +From 83b3fa31740e063ba4c86667097db974e6ae0c68 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 17 Jul 2019 16:33:21 +1000 -Subject: [PATCH 4/6] directmanipulation: Create +Subject: [PATCH] directmanipulation: Create DirectManipulationManager/DirectManipulationSharedManager objects Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44865 Signed-off-by: Alistair Leslie-Hughes --- dlls/directmanipulation/Makefile.in | 1 + - dlls/directmanipulation/directmanipulation.c | 205 ++++++++++++++++++- - 2 files changed, 204 insertions(+), 2 deletions(-) + dlls/directmanipulation/directmanipulation.c | 203 ++++++++++++++++++- + 2 files changed, 203 insertions(+), 1 deletion(-) diff --git a/dlls/directmanipulation/Makefile.in b/dlls/directmanipulation/Makefile.in -index 331c2a8420..d67a21eb77 100644 +index 331c2a84205..d67a21eb779 100644 --- a/dlls/directmanipulation/Makefile.in +++ b/dlls/directmanipulation/Makefile.in @@ -1,4 +1,5 @@ @@ -22,7 +22,7 @@ index 331c2a8420..d67a21eb77 100644 EXTRADLLFLAGS = -mno-cygwin diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c -index 136b2976a4..81efa3688b 100644 +index f808bc1a331..a1e508bac80 100644 --- a/dlls/directmanipulation/directmanipulation.c +++ b/dlls/directmanipulation/directmanipulation.c @@ -15,6 +15,7 @@ @@ -251,9 +251,7 @@ index 136b2976a4..81efa3688b 100644 + + FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; --} -\ No newline at end of file -+} + } -- -2.17.1 +2.27.0 diff --git a/patches/ntdll-DOS_Attributes/0001-ntdll-Implement-retrieving-DOS-attributes-in-NtQuery.patch b/patches/ntdll-DOS_Attributes/0001-ntdll-Implement-retrieving-DOS-attributes-in-fd_-get.patch similarity index 68% rename from patches/ntdll-DOS_Attributes/0001-ntdll-Implement-retrieving-DOS-attributes-in-NtQuery.patch rename to patches/ntdll-DOS_Attributes/0001-ntdll-Implement-retrieving-DOS-attributes-in-fd_-get.patch index 2fc8ee32..1b9b1b82 100644 --- a/patches/ntdll-DOS_Attributes/0001-ntdll-Implement-retrieving-DOS-attributes-in-NtQuery.patch +++ b/patches/ntdll-DOS_Attributes/0001-ntdll-Implement-retrieving-DOS-attributes-in-fd_-get.patch @@ -1,23 +1,23 @@ -From 74693bc85e3dbc1f757cfea348dc385b4badeb89 Mon Sep 17 00:00:00 2001 +From 0bfc43bff3a9b53e65c82d987bb072f0ff0a3a2b Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Tue, 19 Aug 2014 22:10:49 -0600 Subject: [PATCH] ntdll: Implement retrieving DOS attributes in - NtQueryInformationFile. + [fd_]get_file_info(). --- - configure.ac | 12 ++++++++++++ - dlls/ntdll/file.c | 16 ++++++++++++++++ - include/wine/port.h | 8 ++++++++ - libs/port/Makefile.in | 3 ++- - libs/port/xattr.c | 39 +++++++++++++++++++++++++++++++++++++++ - 5 files changed, 77 insertions(+), 1 deletion(-) + configure.ac | 12 +++++++++++ + dlls/ntdll/unix/file.c | 22 ++++++++++++++++++- + include/wine/port.h | 9 ++++++++ + libs/port/Makefile.in | 3 ++- + libs/port/xattr.c | 49 ++++++++++++++++++++++++++++++++++++++++++ + 5 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 libs/port/xattr.c diff --git a/configure.ac b/configure.ac -index 180d958fc4ef..1e3d2e0d4ef0 100644 +index d3bd12a6340..5e775c04449 100644 --- a/configure.ac +++ b/configure.ac -@@ -89,6 +89,7 @@ AC_ARG_WITH(usb, AS_HELP_STRING([--without-usb],[do not use the libusb lib +@@ -88,6 +88,7 @@ AC_ARG_WITH(usb, AS_HELP_STRING([--without-usb],[do not use the libusb lib AC_ARG_WITH(v4l2, AS_HELP_STRING([--without-v4l2],[do not use v4l2 (video capture)])) AC_ARG_WITH(vkd3d, AS_HELP_STRING([--without-vkd3d],[do not use vkd3d (Direct3D 12 support)])) AC_ARG_WITH(vulkan, AS_HELP_STRING([--without-vulkan],[do not use Vulkan])) @@ -25,7 +25,7 @@ index 180d958fc4ef..1e3d2e0d4ef0 100644 AC_ARG_WITH(xcomposite,AS_HELP_STRING([--without-xcomposite],[do not use the Xcomposite extension]), [if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_Xcomposite_h=no; fi]) AC_ARG_WITH(xcursor, AS_HELP_STRING([--without-xcursor],[do not use the Xcursor extension]), -@@ -709,6 +710,17 @@ AC_CHECK_HEADERS([libprocstat.h],,, +@@ -697,6 +698,17 @@ AC_CHECK_HEADERS([libprocstat.h],,, #include #endif]) @@ -43,13 +43,13 @@ index 180d958fc4ef..1e3d2e0d4ef0 100644 dnl **** Check for working dll **** AC_SUBST(DLLFLAGS,"-D_REENTRANT") -diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c -index 9a9acfdb623b..5536e61db2e4 100644 ---- a/dlls/ntdll/file.c -+++ b/dlls/ntdll/file.c -@@ -126,6 +126,22 @@ mode_t FILE_umask = 0; - NTSTATUS FILE_DecodeSymlink(const char *unix_src, char *unix_dest, USHORT *unix_dest_len, - DWORD *tag, ULONG *flags, BOOL *is_dir); +diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c +index 66ce2eb5fe4..d2e783f3300 100644 +--- a/dlls/ntdll/unix/file.c ++++ b/dlls/ntdll/unix/file.c +@@ -1431,6 +1431,22 @@ static BOOL append_entry( struct dir_data *data, const char *long_name, + } + +/* Match the Samba conventions for storing DOS file attributes */ +#define SAMBA_XATTR_DOS_ATTRIB XATTR_USER_PREFIX "DOSATTRIB" @@ -70,11 +70,31 @@ index 9a9acfdb623b..5536e61db2e4 100644 /* fetch the attributes of a file */ static inline ULONG get_file_attributes( const struct stat *st ) { +@@ -1450,7 +1466,8 @@ static inline ULONG get_file_attributes( const struct stat *st ) + static int get_file_info( const char *path, struct stat *st, ULONG *attr ) + { + char *parent_path; +- int ret; ++ char hexattr[11]; ++ int len, ret; + + *attr = 0; + ret = lstat( path, st ); +@@ -1476,6 +1493,9 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr ) + RtlFreeHeap( GetProcessHeap(), 0, parent_path ); + } + *attr |= get_file_attributes( st ); ++ len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 ); ++ if (len == -1) return ret; ++ *attr |= get_file_xattr( hexattr, len ); + return ret; + } + diff --git a/include/wine/port.h b/include/wine/port.h -index e8434c73cca2..f0507efcc7e7 100644 +index e8434c73cca..6e81cb71a76 100644 --- a/include/wine/port.h +++ b/include/wine/port.h -@@ -361,6 +361,14 @@ int usleep (unsigned int useconds); +@@ -361,6 +361,15 @@ int usleep (unsigned int useconds); extern int mkstemps(char *template, int suffix_len); @@ -85,12 +105,13 @@ index e8434c73cca2..f0507efcc7e7 100644 +#endif + +extern int xattr_fget( int filedes, const char *name, void *value, size_t size ); ++extern int xattr_get( const char *path, const char *name, void *value, size_t size ); + #else /* NO_LIBWINE_PORT */ #define __WINE_NOT_PORTABLE(func) func##_is_not_portable func##_is_not_portable diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in -index 1963afe24232..4b1ecab7516b 100644 +index 1963afe2423..4b1ecab7516 100644 --- a/libs/port/Makefile.in +++ b/libs/port/Makefile.in @@ -22,4 +22,5 @@ C_SRCS = \ @@ -102,10 +123,10 @@ index 1963afe24232..4b1ecab7516b 100644 + xattr.c diff --git a/libs/port/xattr.c b/libs/port/xattr.c new file mode 100644 -index 000000000000..94b77132bbf2 +index 00000000000..88e900dac6d --- /dev/null +++ b/libs/port/xattr.c -@@ -0,0 +1,39 @@ +@@ -0,0 +1,49 @@ +/* + * extended attributes functions + * @@ -145,6 +166,16 @@ index 000000000000..94b77132bbf2 + return -1; +#endif +} ++ ++int xattr_get( const char *path, const char *name, void *value, size_t size ) ++{ ++#if defined(HAVE_ATTR_XATTR_H) ++ return getxattr( path, name, value, size ); ++#else ++ errno = ENOSYS; ++ return -1; ++#endif ++} -- -2.26.2 +2.27.0 diff --git a/patches/ntdll-DOS_Attributes/0002-ntdll-Implement-retrieving-DOS-attributes-in-NtQuery.patch b/patches/ntdll-DOS_Attributes/0002-ntdll-Implement-retrieving-DOS-attributes-in-NtQuery.patch deleted file mode 100644 index 21d2eb2f..00000000 --- a/patches/ntdll-DOS_Attributes/0002-ntdll-Implement-retrieving-DOS-attributes-in-NtQuery.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 34ed49d7dbff7c5f0da8553330c3378b574429fc Mon Sep 17 00:00:00 2001 -From: "Erich E. Hoover" -Date: Wed, 20 Aug 2014 16:04:34 -0600 -Subject: [PATCH] ntdll: Implement retrieving DOS attributes in - NtQuery[Full]AttributesFile and NtQueryDirectoryFile. - ---- - dlls/ntdll/file.c | 6 +++++- - include/wine/port.h | 1 + - libs/port/xattr.c | 10 ++++++++++ - 3 files changed, 16 insertions(+), 1 deletion(-) - -diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c -index 5536e61db2e4..2fd62ebfb802 100644 ---- a/dlls/ntdll/file.c -+++ b/dlls/ntdll/file.c -@@ -182,7 +182,8 @@ int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULONG *attr - int get_file_info( const char *path, struct stat *st, ULONG *attr ) - { - char *parent_path; -- int ret; -+ char hexattr[11]; -+ int len, ret; - - *attr = 0; - ret = lstat( path, st ); -@@ -215,6 +216,9 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr ) - RtlFreeHeap( GetProcessHeap(), 0, parent_path ); - } - *attr |= get_file_attributes( st ); -+ len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 ); -+ if (len == -1) return ret; -+ *attr |= get_file_xattr( hexattr, len ); - return ret; - } - -diff --git a/include/wine/port.h b/include/wine/port.h -index f0507efcc7e7..6e81cb71a76d 100644 ---- a/include/wine/port.h -+++ b/include/wine/port.h -@@ -368,6 +368,7 @@ extern int mkstemps(char *template, int suffix_len); - #endif - - extern int xattr_fget( int filedes, const char *name, void *value, size_t size ); -+extern int xattr_get( const char *path, const char *name, void *value, size_t size ); - - #else /* NO_LIBWINE_PORT */ - -diff --git a/libs/port/xattr.c b/libs/port/xattr.c -index 94b77132bbf2..88e900dac6d4 100644 ---- a/libs/port/xattr.c -+++ b/libs/port/xattr.c -@@ -37,3 +37,13 @@ int xattr_fget( int filedes, const char *name, void *value, size_t size ) - return -1; - #endif - } -+ -+int xattr_get( const char *path, const char *name, void *value, size_t size ) -+{ -+#if defined(HAVE_ATTR_XATTR_H) -+ return getxattr( path, name, value, size ); -+#else -+ errno = ENOSYS; -+ return -1; -+#endif -+} --- -2.26.2 - diff --git a/patches/ntdll-DOS_Attributes/0003-ntdll-Implement-storing-DOS-attributes-in-NtSetInfor.patch b/patches/ntdll-DOS_Attributes/0003-ntdll-Implement-storing-DOS-attributes-in-NtSetInfor.patch index 62aac115..ab1e436a 100644 --- a/patches/ntdll-DOS_Attributes/0003-ntdll-Implement-storing-DOS-attributes-in-NtSetInfor.patch +++ b/patches/ntdll-DOS_Attributes/0003-ntdll-Implement-storing-DOS-attributes-in-NtSetInfor.patch @@ -1,4 +1,4 @@ -From 1a04bc9a0ef3cf03b89d50becee9240f8a195873 Mon Sep 17 00:00:00 2001 +From 9f17f2e4f9842549820691f34f7d2da5719ead0a Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 20 Aug 2014 00:08:52 -0600 Subject: [PATCH] ntdll: Implement storing DOS attributes in @@ -12,10 +12,10 @@ Subject: [PATCH] ntdll: Implement storing DOS attributes in 4 files changed, 60 insertions(+), 24 deletions(-) diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c -index 2fd62ebfb802..c077add9769e 100644 +index bd6e3cbcf88..c1f9808e497 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c -@@ -178,6 +178,39 @@ int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULONG *attr +@@ -177,6 +177,39 @@ int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULONG *attr return ret; } @@ -52,10 +52,10 @@ index 2fd62ebfb802..c077add9769e 100644 + return STATUS_SUCCESS; +} + - /* get the stat info and file attributes for a file (by name) */ - int get_file_info( const char *path, struct stat *st, ULONG *attr ) + static int get_file_info( const char *path, struct stat *st, ULONG *attr ) { -@@ -3240,7 +3273,6 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io, + char *parent_path; +@@ -3113,7 +3146,6 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io, case FileBasicInformation: if (len >= sizeof(FILE_BASIC_INFORMATION)) { @@ -63,7 +63,7 @@ index 2fd62ebfb802..c077add9769e 100644 const FILE_BASIC_INFORMATION *info = ptr; LARGE_INTEGER mtime, atime; -@@ -3254,25 +3286,7 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io, +@@ -3127,25 +3159,7 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io, io->u.Status = set_file_times( fd, &mtime, &atime ); if (io->u.Status == STATUS_SUCCESS && info->FileAttributes) @@ -91,7 +91,7 @@ index 2fd62ebfb802..c077add9769e 100644 if (needs_close) close( fd ); } diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c -index 0b05c39685cd..b49a9a4dbbda 100644 +index 67d54c81fb0..4c2e63d3679 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -1365,7 +1365,7 @@ static void test_file_basic_information(void) @@ -131,7 +131,7 @@ index 0b05c39685cd..b49a9a4dbbda 100644 /* Check NORMAL last of all (to make sure we can clear attributes) */ memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation)); diff --git a/include/wine/port.h b/include/wine/port.h -index 6e81cb71a76d..f90396727d6d 100644 +index 6e81cb71a76..f90396727d6 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -368,6 +368,8 @@ extern int mkstemps(char *template, int suffix_len); @@ -144,7 +144,7 @@ index 6e81cb71a76d..f90396727d6d 100644 #else /* NO_LIBWINE_PORT */ diff --git a/libs/port/xattr.c b/libs/port/xattr.c -index 88e900dac6d4..6918c9956cc6 100644 +index 88e900dac6d..6918c9956cc 100644 --- a/libs/port/xattr.c +++ b/libs/port/xattr.c @@ -38,6 +38,26 @@ int xattr_fget( int filedes, const char *name, void *value, size_t size ) @@ -175,5 +175,5 @@ index 88e900dac6d4..6918c9956cc6 100644 { #if defined(HAVE_ATTR_XATTR_H) -- -2.26.2 +2.27.0 diff --git a/patches/ntdll-DOS_Attributes/0004-ntdll-Implement-storing-DOS-attributes-in-NtCreateFi.patch b/patches/ntdll-DOS_Attributes/0004-ntdll-Implement-storing-DOS-attributes-in-NtCreateFi.patch index 66bb9082..e78705b3 100644 --- a/patches/ntdll-DOS_Attributes/0004-ntdll-Implement-storing-DOS-attributes-in-NtCreateFi.patch +++ b/patches/ntdll-DOS_Attributes/0004-ntdll-Implement-storing-DOS-attributes-in-NtCreateFi.patch @@ -1,136 +1,17 @@ -From 8fde8af21e169d9a48bab50bac4d6e24238141b6 Mon Sep 17 00:00:00 2001 +From 769a1043bb174557b600c9ce38765846a3126e7f Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 20 Aug 2014 15:28:00 -0600 Subject: [PATCH] ntdll: Implement storing DOS attributes in NtCreateFile. --- - dlls/ntdll/file.c | 76 +++++++++++++++++++++++------------- dlls/ntdll/tests/directory.c | 24 ++++++------ + dlls/ntdll/unix/file.c | 74 +++++++++++++++++++++++------------- include/wine/port.h | 2 + libs/port/xattr.c | 20 ++++++++++ - 4 files changed, 82 insertions(+), 40 deletions(-) + 4 files changed, 81 insertions(+), 39 deletions(-) -diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c -index c077add9769e..a596afed72e7 100644 ---- a/dlls/ntdll/file.c -+++ b/dlls/ntdll/file.c -@@ -255,6 +255,21 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr ) - return ret; - } - -+NTSTATUS set_file_info( const char *path, ULONG attr ) -+{ -+ char hexattr[11]; -+ int len; -+ -+ /* Note: unix mode already set when called this way */ -+ attr &= ~FILE_ATTRIBUTE_NORMAL; /* do not store everything, but keep everything Samba can use */ -+ len = sprintf( hexattr, "0x%x", attr ); -+ if (attr != 0) -+ xattr_set( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, len ); -+ else -+ xattr_remove( path, SAMBA_XATTR_DOS_ATTRIB ); -+ return STATUS_SUCCESS; -+} -+ - /************************************************************************** - * FILE_CreateFile (internal) - * Open a file. -@@ -266,6 +281,10 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT - ULONG attributes, ULONG sharing, ULONG disposition, - ULONG options, PVOID ea_buffer, ULONG ea_length ) - { -+ static UNICODE_STRING empty_string; -+ OBJECT_ATTRIBUTES unix_attr; -+ data_size_t len; -+ struct object_attributes *objattr; - ANSI_STRING unix_name; - BOOL created = FALSE; - -@@ -309,37 +328,34 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT - io->u.Status = STATUS_SUCCESS; - } - -- if (io->u.Status == STATUS_SUCCESS) -+ if (io->u.Status != STATUS_SUCCESS) - { -- static UNICODE_STRING empty_string; -- OBJECT_ATTRIBUTES unix_attr = *attr; -- data_size_t len; -- struct object_attributes *objattr; -- -- unix_attr.ObjectName = &empty_string; /* we send the unix name instead */ -- if ((io->u.Status = alloc_object_attributes( &unix_attr, &objattr, &len ))) -- { -- RtlFreeAnsiString( &unix_name ); -- return io->u.Status; -- } -+ WARN("%s not found (%x)\n", debugstr_us(attr->ObjectName), io->u.Status ); -+ return io->u.Status; -+ } - -- SERVER_START_REQ( create_file ) -- { -- req->access = access; -- req->sharing = sharing; -- req->create = disposition; -- req->options = options; -- req->attrs = attributes; -- wine_server_add_data( req, objattr, len ); -- wine_server_add_data( req, unix_name.Buffer, unix_name.Length ); -- io->u.Status = wine_server_call( req ); -- *handle = wine_server_ptr_handle( reply->handle ); -- } -- SERVER_END_REQ; -- RtlFreeHeap( GetProcessHeap(), 0, objattr ); -+ unix_attr = *attr; -+ unix_attr.ObjectName = &empty_string; /* we send the unix name instead */ -+ if ((io->u.Status = alloc_object_attributes( &unix_attr, &objattr, &len ))) -+ { - RtlFreeAnsiString( &unix_name ); -+ return io->u.Status; - } -- else WARN("%s not found (%x)\n", debugstr_us(attr->ObjectName), io->u.Status ); -+ -+ SERVER_START_REQ( create_file ) -+ { -+ req->access = access; -+ req->sharing = sharing; -+ req->create = disposition; -+ req->options = options; -+ req->attrs = attributes; -+ wine_server_add_data( req, objattr, len ); -+ wine_server_add_data( req, unix_name.Buffer, unix_name.Length ); -+ io->u.Status = wine_server_call( req ); -+ *handle = wine_server_ptr_handle( reply->handle ); -+ } -+ SERVER_END_REQ; -+ RtlFreeHeap( GetProcessHeap(), 0, objattr ); - - if (io->u.Status == STATUS_SUCCESS) - { -@@ -361,6 +377,11 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT - io->Information = FILE_OVERWRITTEN; - break; - } -+ if (io->Information == FILE_CREATED) -+ { -+ /* set any DOS extended attributes */ -+ set_file_info( unix_name.Buffer, attributes ); -+ } - } - else if (io->u.Status == STATUS_TOO_MANY_OPENED_FILES) - { -@@ -368,6 +389,7 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT - if (!once++) ERR_(winediag)( "Too many open files, ulimit -n probably needs to be increased\n" ); - } - -+ RtlFreeAnsiString( &unix_name ); - return io->u.Status; - } - diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c -index 4618f4eaff2b..44933c2153df 100644 +index 248ed99ab20..e0f4debc624 100644 --- a/dlls/ntdll/tests/directory.c +++ b/dlls/ntdll/tests/directory.c @@ -55,7 +55,6 @@ static NTSTATUS (WINAPI *pRtlWow64EnableFsRedirectionEx)( ULONG disable, ULONG * @@ -178,8 +59,125 @@ index 4618f4eaff2b..44933c2153df 100644 testfiles[i].attr_done = TRUE; } testfiles[i].nfound++; +diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c +index 66ce2eb5fe4..0546039cc47 100644 +--- a/dlls/ntdll/unix/file.c ++++ b/dlls/ntdll/unix/file.c +@@ -3004,6 +3004,20 @@ void CDECL set_show_dot_files( BOOL enable ) + show_dot_files = enable; + } + ++NTSTATUS set_file_info( const char *path, ULONG attr ) ++{ ++ char hexattr[11]; ++ int len; ++ ++ /* Note: unix mode already set when called this way */ ++ attr &= ~FILE_ATTRIBUTE_NORMAL; /* do not store everything, but keep everything Samba can use */ ++ len = sprintf( hexattr, "0x%x", attr ); ++ if (attr != 0) ++ xattr_set( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, len ); ++ else ++ xattr_remove( path, SAMBA_XATTR_DOS_ATTRIB ); ++ return STATUS_SUCCESS; ++} + + /****************************************************************************** + * NtCreateFile (NTDLL.@) +@@ -3013,6 +3027,10 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU + ULONG attributes, ULONG sharing, ULONG disposition, + ULONG options, void *ea_buffer, ULONG ea_length ) + { ++ static UNICODE_STRING empty_string; ++ OBJECT_ATTRIBUTES unix_attr; ++ data_size_t len; ++ struct object_attributes *objattr; + ANSI_STRING unix_name; + BOOL created = FALSE; + +@@ -3055,36 +3073,34 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU + io->u.Status = STATUS_SUCCESS; + } + +- if (io->u.Status == STATUS_SUCCESS) ++ if (io->u.Status != STATUS_SUCCESS) + { +- static UNICODE_STRING empty_string; +- OBJECT_ATTRIBUTES unix_attr = *attr; +- data_size_t len; +- struct object_attributes *objattr; ++ WARN("%s not found (%x)\n", debugstr_us(attr->ObjectName), io->u.Status ); ++ return io->u.Status; ++ } + +- unix_attr.ObjectName = &empty_string; /* we send the unix name instead */ +- if ((io->u.Status = alloc_object_attributes( &unix_attr, &objattr, &len ))) +- { +- RtlFreeAnsiString( &unix_name ); +- return io->u.Status; +- } +- SERVER_START_REQ( create_file ) +- { +- req->access = access; +- req->sharing = sharing; +- req->create = disposition; +- req->options = options; +- req->attrs = attributes; +- wine_server_add_data( req, objattr, len ); +- wine_server_add_data( req, unix_name.Buffer, unix_name.Length ); +- io->u.Status = wine_server_call( req ); +- *handle = wine_server_ptr_handle( reply->handle ); +- } +- SERVER_END_REQ; +- RtlFreeHeap( GetProcessHeap(), 0, objattr ); ++ unix_attr = *attr; ++ unix_attr.ObjectName = &empty_string; /* we send the unix name instead */ ++ if ((io->u.Status = alloc_object_attributes( &unix_attr, &objattr, &len ))) ++ { + RtlFreeAnsiString( &unix_name ); ++ return io->u.Status; + } +- else WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), io->u.Status ); ++ ++ SERVER_START_REQ( create_file ) ++ { ++ req->access = access; ++ req->sharing = sharing; ++ req->create = disposition; ++ req->options = options; ++ req->attrs = attributes; ++ wine_server_add_data( req, objattr, len ); ++ wine_server_add_data( req, unix_name.Buffer, unix_name.Length ); ++ io->u.Status = wine_server_call( req ); ++ *handle = wine_server_ptr_handle( reply->handle ); ++ } ++ SERVER_END_REQ; ++ RtlFreeHeap( GetProcessHeap(), 0, objattr ); + + if (io->u.Status == STATUS_SUCCESS) + { +@@ -3106,6 +3122,11 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU + io->Information = FILE_OVERWRITTEN; + break; + } ++ if (io->Information == FILE_CREATED) ++ { ++ /* set any DOS extended attributes */ ++ set_file_info( unix_name.Buffer, attributes ); ++ } + } + else if (io->u.Status == STATUS_TOO_MANY_OPENED_FILES) + { +@@ -3113,6 +3134,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU + if (!once++) ERR_(winediag)( "Too many open files, ulimit -n probably needs to be increased\n" ); + } + ++ RtlFreeAnsiString( &unix_name ); + return io->u.Status; + } + diff --git a/include/wine/port.h b/include/wine/port.h -index f90396727d6d..7d2c73887073 100644 +index f90396727d6..7d2c7388707 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -371,6 +371,8 @@ extern int xattr_fget( int filedes, const char *name, void *value, size_t size ) @@ -192,7 +190,7 @@ index f90396727d6d..7d2c73887073 100644 #else /* NO_LIBWINE_PORT */ diff --git a/libs/port/xattr.c b/libs/port/xattr.c -index 6918c9956cc6..683e7a615e2b 100644 +index 6918c9956cc..683e7a615e2 100644 --- a/libs/port/xattr.c +++ b/libs/port/xattr.c @@ -67,3 +67,23 @@ int xattr_get( const char *path, const char *name, void *value, size_t size ) @@ -220,5 +218,5 @@ index 6918c9956cc6..683e7a615e2b 100644 +#endif +} -- -2.26.2 +2.27.0 diff --git a/patches/ntdll-DOS_Attributes/0007-ntdll-Perform-the-Unix-style-hidden-file-check-withi.patch b/patches/ntdll-DOS_Attributes/0007-ntdll-Perform-the-Unix-style-hidden-file-check-withi.patch index 7351d7b6..b9156aea 100644 --- a/patches/ntdll-DOS_Attributes/0007-ntdll-Perform-the-Unix-style-hidden-file-check-withi.patch +++ b/patches/ntdll-DOS_Attributes/0007-ntdll-Perform-the-Unix-style-hidden-file-check-withi.patch @@ -1,31 +1,27 @@ -From e1e41f084c6cdeba3cb44aaa6753b13bc1411df8 Mon Sep 17 00:00:00 2001 +From 01a10dd50491ca0162a5293836cf9b9a3d3c0e34 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 20 Aug 2014 11:26:48 -0600 Subject: [PATCH] ntdll: Perform the Unix-style hidden file check within the unified file info grabbing routine. --- - dlls/ntdll/directory.c | 15 +++++---------- - dlls/ntdll/file.c | 10 ++++------ - dlls/ntdll/ntdll_misc.h | 2 +- - 3 files changed, 10 insertions(+), 17 deletions(-) + dlls/ntdll/unix/file.c | 23 +++++++++-------------- + 1 file changed, 9 insertions(+), 14 deletions(-) -diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c -index ba50aa1b807..d6bf1354a5b 100644 ---- a/dlls/ntdll/directory.c -+++ b/dlls/ntdll/directory.c -@@ -1274,17 +1274,17 @@ static DWORD WINAPI init_options( RTL_RUN_ONCE *once, void *param, void **contex +diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c +index 496c92265e9..6f3772d20be 100644 +--- a/dlls/ntdll/unix/file.c ++++ b/dlls/ntdll/unix/file.c +@@ -1217,15 +1217,15 @@ static BOOLEAN get_dir_case_sensitivity( const char *dir ) * * Check if the specified file should be hidden based on its name and the show dot files option. */ --BOOL DIR_is_hidden_file( const UNICODE_STRING *name ) -+BOOL DIR_is_hidden_file( const char *name ) +-static BOOL is_hidden_file( const UNICODE_STRING *name ) ++static BOOL is_hidden_file( const char *name ) { - WCHAR *p, *end; + char *p, *end; - RtlRunOnceExecuteOnce( &init_once, init_options, NULL, NULL ); - if (show_dot_files) return FALSE; - end = p = name->Buffer + name->Length/sizeof(WCHAR); @@ -37,7 +33,18 @@ index ba50aa1b807..d6bf1354a5b 100644 if (p == end || *p != '.') return FALSE; /* make sure it isn't '.' or '..' */ if (p + 1 == end) return FALSE; -@@ -1532,11 +1532,6 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I +@@ -1493,6 +1493,10 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr ) + RtlFreeHeap( GetProcessHeap(), 0, parent_path ); + } + *attr |= get_file_attributes( st ); ++ /* convert Unix-style hidden files to a DOS hidden file attribute */ ++ if (is_hidden_file( path )) ++ *attr |= FILE_ATTRIBUTE_HIDDEN; ++ /* retrieve any stored DOS attributes */ + len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 ); + if (len == -1) return ret; + *attr |= get_file_xattr( hexattr, len ); +@@ -1684,11 +1688,6 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I if (class != FileNamesInformation) { if (st.st_dev != dir_data->id.dev) st.st_ino = 0; /* ignore inode if on a different device */ @@ -49,55 +56,25 @@ index ba50aa1b807..d6bf1354a5b 100644 fill_file_info( &st, attributes, info, class ); } -diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c -index 6a935044f46..a0e54c27198 100644 ---- a/dlls/ntdll/file.c -+++ b/dlls/ntdll/file.c -@@ -250,6 +250,10 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr ) - RtlFreeHeap( GetProcessHeap(), 0, parent_path ); - } - *attr |= get_file_attributes( st ); -+ /* convert Unix-style hidden files to a DOS hidden file attribute */ -+ if (DIR_is_hidden_file( path )) -+ *attr |= FILE_ATTRIBUTE_HIDDEN; -+ /* retrieve any stored DOS attributes */ - len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 ); - if (len == -1) return ret; - *attr |= get_file_xattr( hexattr, len ); -@@ -3489,8 +3493,6 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr, +@@ -3301,7 +3300,6 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr, info->AllocationSize = std.AllocationSize; info->EndOfFile = std.EndOfFile; info->FileAttributes = basic.FileAttributes; -- if (DIR_is_hidden_file( attr->ObjectName )) -- info->FileAttributes |= FILE_ATTRIBUTE_HIDDEN; +- if (is_hidden_file( attr->ObjectName )) info->FileAttributes |= FILE_ATTRIBUTE_HIDDEN; } RtlFreeAnsiString( &unix_name ); } -@@ -3518,11 +3520,7 @@ NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC +@@ -3328,10 +3326,7 @@ NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC else if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode)) status = STATUS_INVALID_INFO_CLASS; else - { status = fill_file_info( &st, attributes, info, FileBasicInformation ); -- if (DIR_is_hidden_file( attr->ObjectName )) -- info->FileAttributes |= FILE_ATTRIBUTE_HIDDEN; +- if (is_hidden_file( attr->ObjectName )) info->FileAttributes |= FILE_ATTRIBUTE_HIDDEN; - } RtlFreeAnsiString( &unix_name ); } - else WARN("%s not found (%x)\n", debugstr_us(attr->ObjectName), status ); -diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index aeed9b857c2..b1cb9aa6843 100644 ---- a/dlls/ntdll/ntdll_misc.h -+++ b/dlls/ntdll/ntdll_misc.h -@@ -168,7 +168,7 @@ extern NTSTATUS fill_file_info( const struct stat *st, ULONG attr, void *ptr, - FILE_INFORMATION_CLASS class ) DECLSPEC_HIDDEN; - extern NTSTATUS server_get_unix_name( HANDLE handle, ANSI_STRING *unix_name ) DECLSPEC_HIDDEN; - extern void init_directories(void) DECLSPEC_HIDDEN; --extern BOOL DIR_is_hidden_file( const UNICODE_STRING *name ) DECLSPEC_HIDDEN; -+extern BOOL DIR_is_hidden_file( const char *name ) DECLSPEC_HIDDEN; - extern NTSTATUS DIR_unmount_device( HANDLE handle ) DECLSPEC_HIDDEN; - extern NTSTATUS DIR_get_unix_cwd( char **cwd ) DECLSPEC_HIDDEN; - extern unsigned int DIR_get_drives_info( struct drive_info info[MAX_DOS_DRIVES] ) DECLSPEC_HIDDEN; + else WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), status ); -- -2.25.1 +2.27.0 diff --git a/patches/ntdll-DOS_Attributes/definition b/patches/ntdll-DOS_Attributes/definition index 274963b7..68d8e88e 100644 --- a/patches/ntdll-DOS_Attributes/definition +++ b/patches/ntdll-DOS_Attributes/definition @@ -2,3 +2,6 @@ Fixes: [9158] Support for DOS hidden/system file attributes Fixes: [15679] cygwin symlinks not working in wine # Depends: ntdll-Syscall_Wrappers Depends: ntdll-Junction_Points +# Currently awkwardly split between ntdll.dll and ntdll.so; wait for the rest +# of the file functions to be moved to ntdll.so before finishing the rebase. +Disabled: true diff --git a/patches/ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch b/patches/ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch index bf05ff10..fa2e0410 100644 --- a/patches/ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch +++ b/patches/ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch @@ -1,4 +1,4 @@ -From e171bdbabedaeaafc0181ee156bf08ef180809da Mon Sep 17 00:00:00 2001 +From e3e2a837a2dd411b3e265581388fba1050e08c53 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Thu, 16 Jan 2014 20:56:49 -0700 Subject: [PATCH] ntdll: Add support for junction point creation. @@ -18,10 +18,10 @@ Signed-off-by: Erich E. Hoover create mode 100644 libs/port/renameat2.c diff --git a/configure.ac b/configure.ac -index 816e3684510..a1b6096b9b7 100644 +index 8a76b74e83d..d3bd12a6340 100644 --- a/configure.ac +++ b/configure.ac -@@ -2202,6 +2202,8 @@ AC_CHECK_FUNCS(\ +@@ -2203,6 +2203,8 @@ AC_CHECK_FUNCS(\ pwrite \ readdir \ readlink \ @@ -31,7 +31,7 @@ index 816e3684510..a1b6096b9b7 100644 select \ setproctitle \ diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c -index 013706889bb..37dca75651c 100644 +index b3e881ac3c9..5a4004a61a4 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -21,6 +21,7 @@ @@ -49,8 +49,8 @@ index 013706889bb..37dca75651c 100644 +#include "ntifs.h" WINE_DEFAULT_DEBUG_CHANNEL(ntdll); - WINE_DECLARE_DEBUG_CHANNEL(winediag); -@@ -1663,6 +1665,104 @@ NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE handle, HANDLE event, + +@@ -1545,6 +1547,104 @@ NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE handle, HANDLE event, } @@ -155,7 +155,7 @@ index 013706889bb..37dca75651c 100644 /************************************************************************** * NtFsControlFile [NTDLL.@] * ZwFsControlFile [NTDLL.@] -@@ -1747,6 +1847,24 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc +@@ -1629,6 +1729,24 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc io->Information = 0; status = STATUS_SUCCESS; break; @@ -181,7 +181,7 @@ index 013706889bb..37dca75651c 100644 return server_ioctl_file( handle, event, apc, apc_context, io, code, in_buffer, in_size, out_buffer, out_size ); diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c -index 31c18454f0e..046b49c2d2b 100644 +index 184b7cdad59..8b5ddbb0da1 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -38,6 +38,7 @@ @@ -192,7 +192,7 @@ index 31c18454f0e..046b49c2d2b 100644 #ifndef IO_COMPLETION_ALL_ACCESS #define IO_COMPLETION_ALL_ACCESS 0x001F0003 -@@ -4953,6 +4954,105 @@ static void test_file_readonly_access(void) +@@ -4971,6 +4972,105 @@ static void test_file_readonly_access(void) DeleteFileW(path); } @@ -298,17 +298,17 @@ index 31c18454f0e..046b49c2d2b 100644 START_TEST(file) { HMODULE hkernel32 = GetModuleHandleA("kernel32.dll"); -@@ -5023,4 +5123,5 @@ START_TEST(file) +@@ -5041,4 +5141,5 @@ START_TEST(file) test_query_attribute_information_file(); test_ioctl(); test_flush_buffers_file(); + test_reparse_points(); } diff --git a/include/Makefile.in b/include/Makefile.in -index 9796dd8e5d9..410ae718e99 100644 +index 9f70e72b4c7..1c5c456aa39 100644 --- a/include/Makefile.in +++ b/include/Makefile.in -@@ -517,6 +517,7 @@ SOURCES = \ +@@ -518,6 +518,7 @@ SOURCES = \ ntddvdeo.h \ ntdef.h \ ntdsapi.h \ @@ -458,5 +458,5 @@ index 00000000000..f46f407ec71 +} +#endif /* HAVE_RENAMEAT2 */ -- -2.26.2 +2.27.0 diff --git a/patches/ntdll-Junction_Points/0013-ntdll-Allow-creation-of-dangling-reparse-points-to-n.patch b/patches/ntdll-Junction_Points/0013-ntdll-Allow-creation-of-dangling-reparse-points-to-n.patch index 57e40156..c2f5842c 100644 --- a/patches/ntdll-Junction_Points/0013-ntdll-Allow-creation-of-dangling-reparse-points-to-n.patch +++ b/patches/ntdll-Junction_Points/0013-ntdll-Allow-creation-of-dangling-reparse-points-to-n.patch @@ -1,4 +1,4 @@ -From 5b9831bcc26ab81b428b9c8f996c50b50c195a5d Mon Sep 17 00:00:00 2001 +From 804bc6397bcf91a50ec6d13ca296e564ee19d689 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Tue, 30 Apr 2019 16:24:54 -0600 Subject: [PATCH] ntdll: Allow creation of dangling reparse points to @@ -6,16 +6,31 @@ Subject: [PATCH] ntdll: Allow creation of dangling reparse points to Signed-off-by: Erich E. Hoover --- - dlls/ntdll/directory.c | 13 +++++++++++++ dlls/ntdll/file.c | 3 ++- + dlls/ntdll/unix/file.c | 13 +++++++++++++ include/winternl.h | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) -diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c -index 7b0627cd3d..669fd56cbe 100644 ---- a/dlls/ntdll/directory.c -+++ b/dlls/ntdll/directory.c -@@ -2644,6 +2644,19 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer +diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c +index 6c5da524aad..aad4ba5615b 100644 +--- a/dlls/ntdll/file.c ++++ b/dlls/ntdll/file.c +@@ -1619,8 +1619,9 @@ NTSTATUS FILE_CreateSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer) + RtlCreateUnicodeString( &nt_dest, dest ); + nt_dest.Length = dest_len; + } ++ + nt_dest_allocated = TRUE; +- status = wine_nt_to_unix_file_name( &nt_dest, &unix_dest, 0, FALSE ); ++ status = wine_nt_to_unix_file_name( &nt_dest, &unix_dest, FILE_WINE_PATH, FALSE ); + if (status != STATUS_SUCCESS && status != STATUS_NO_SUCH_FILE) + goto cleanup; + dest_allocated = TRUE; +diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c +index 13096e085e8..a2fc2a6425b 100644 +--- a/dlls/ntdll/unix/file.c ++++ b/dlls/ntdll/unix/file.c +@@ -2726,6 +2726,19 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer status = STATUS_OBJECT_NAME_COLLISION; } } @@ -35,26 +50,11 @@ index 7b0627cd3d..669fd56cbe 100644 if (status != STATUS_SUCCESS) break; -diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c -index e27382adf7..22764f05f3 100644 ---- a/dlls/ntdll/file.c -+++ b/dlls/ntdll/file.c -@@ -1714,8 +1714,9 @@ NTSTATUS FILE_CreateSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer) - RtlCreateUnicodeString( &nt_dest, dest ); - nt_dest.Length = dest_len; - } -+ - nt_dest_allocated = TRUE; -- status = wine_nt_to_unix_file_name( &nt_dest, &unix_dest, 0, FALSE ); -+ status = wine_nt_to_unix_file_name( &nt_dest, &unix_dest, FILE_WINE_PATH, FALSE ); - if (status != STATUS_SUCCESS && status != STATUS_NO_SUCH_FILE) - goto cleanup; - dest_allocated = TRUE; diff --git a/include/winternl.h b/include/winternl.h -index e0a827a11c..b71e456b53 100644 +index 39776d36f92..2e8c3866a3a 100644 --- a/include/winternl.h +++ b/include/winternl.h -@@ -1816,6 +1816,7 @@ typedef struct _RTL_HANDLE_TABLE +@@ -1839,6 +1839,7 @@ typedef struct _RTL_HANDLE_TABLE #define FILE_OVERWRITE 4 #define FILE_OVERWRITE_IF 5 #define FILE_MAXIMUM_DISPOSITION 5 @@ -63,5 +63,5 @@ index e0a827a11c..b71e456b53 100644 /* Characteristics of a File System */ #define FILE_REMOVABLE_MEDIA 0x00000001 -- -2.24.1 +2.27.0 diff --git a/patches/ntdll-Junction_Points/0018-ntdll-Find-dangling-symlinks-quickly.patch b/patches/ntdll-Junction_Points/0018-ntdll-Find-dangling-symlinks-quickly.patch index b1e31c60..62f3d21e 100644 --- a/patches/ntdll-Junction_Points/0018-ntdll-Find-dangling-symlinks-quickly.patch +++ b/patches/ntdll-Junction_Points/0018-ntdll-Find-dangling-symlinks-quickly.patch @@ -1,4 +1,4 @@ -From 1a7f83237f0d843be63c947f3c9e2aaaa90156a8 Mon Sep 17 00:00:00 2001 +From e17d27788c8368ac1d395c6e142c42249f1e02f4 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 1 May 2019 17:48:51 -0600 Subject: [PATCH] ntdll: Find dangling symlinks quickly. @@ -8,14 +8,14 @@ case-insensitive lookups of files. Signed-off-by: Erich E. Hoover --- - dlls/ntdll/directory.c | 6 +++--- + dlls/ntdll/unix/file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c -index 669fd56cbe..95af2dde24 100644 ---- a/dlls/ntdll/directory.c -+++ b/dlls/ntdll/directory.c -@@ -2053,7 +2053,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i +diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c +index a2fc2a6425b..66ce2eb5fe4 100644 +--- a/dlls/ntdll/unix/file.c ++++ b/dlls/ntdll/unix/file.c +@@ -2146,7 +2146,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i if (ret >= 0 && ret <= MAX_DIR_ENTRY_LEN) { unix_name[pos + ret] = 0; @@ -24,7 +24,7 @@ index 669fd56cbe..95af2dde24 100644 { if (is_win_dir) *is_win_dir = is_same_file( &windir, &st ); return STATUS_SUCCESS; -@@ -2175,7 +2175,7 @@ not_found: +@@ -2257,7 +2257,7 @@ not_found: return STATUS_OBJECT_PATH_NOT_FOUND; success: @@ -33,7 +33,7 @@ index 669fd56cbe..95af2dde24 100644 return STATUS_SUCCESS; } -@@ -2580,7 +2580,7 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer +@@ -2662,7 +2662,7 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer for (p = unix_name + pos ; *p; p++) if (*p == '\\') *p = '/'; if (!name_len || !redirect || (!strstr( unix_name, "/windows/") && strncmp( unix_name, "windows/", 8 ))) { @@ -43,5 +43,5 @@ index 669fd56cbe..95af2dde24 100644 if (disposition == FILE_CREATE) return STATUS_OBJECT_NAME_COLLISION; -- -2.24.1 +2.27.0 diff --git a/patches/ntdll-NtDevicePath/0001-ntdll-Implement-opening-files-through-nt-device-path.patch b/patches/ntdll-NtDevicePath/0001-ntdll-Implement-opening-files-through-nt-device-path.patch index 0a34fb39..042fb77a 100644 --- a/patches/ntdll-NtDevicePath/0001-ntdll-Implement-opening-files-through-nt-device-path.patch +++ b/patches/ntdll-NtDevicePath/0001-ntdll-Implement-opening-files-through-nt-device-path.patch @@ -1,22 +1,76 @@ -From 934a7712600b45fa584386b4ada2a73af88ee072 Mon Sep 17 00:00:00 2001 +From c8bd4fe87f7a49a3da2c53ead6df94a9172e7bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 26 May 2017 05:17:17 +0200 -Subject: ntdll: Implement opening files through nt device paths. +Subject: [PATCH] ntdll: Implement opening files through nt device paths. --- - dlls/ntdll/directory.c | 132 +++++++++++++++++++++++++++++++++++++--- dlls/ntdll/tests/file.c | 25 +++++++- + dlls/ntdll/unix/file.c | 132 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 147 insertions(+), 10 deletions(-) -diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c -index c6249dd8658..242dbd27b2f 100644 ---- a/dlls/ntdll/directory.c -+++ b/dlls/ntdll/directory.c -@@ -2732,16 +2732,10 @@ NTSTATUS nt_to_unix_file_name_attr( const OBJECT_ATTRIBUTES *attr, ANSI_STRING * +diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c +index 184b7cdad59..87b5945a4e2 100644 +--- a/dlls/ntdll/tests/file.c ++++ b/dlls/ntdll/tests/file.c +@@ -135,18 +135,22 @@ static void WINAPI apc( void *arg, IO_STATUS_BLOCK *iosb, ULONG reserved ) + + static void create_file_test(void) + { ++ static const WCHAR notepadW[] = {'n','o','t','e','p','a','d','.','e','x','e',0}; + static const WCHAR systemrootW[] = {'\\','S','y','s','t','e','m','R','o','o','t', + '\\','f','a','i','l','i','n','g',0}; ++ static const WCHAR systemrootExplorerW[] = {'\\','S','y','s','t','e','m','R','o','o','t', ++ '\\','e','x','p','l','o','r','e','r','.','e','x','e',0}; + static const WCHAR questionmarkInvalidNameW[] = {'a','f','i','l','e','?',0}; + static const WCHAR pipeInvalidNameW[] = {'a','|','b',0}; + static const WCHAR pathInvalidNtW[] = {'\\','\\','?','\\',0}; + static const WCHAR pathInvalidNt2W[] = {'\\','?','?','\\',0}; + static const WCHAR pathInvalidDosW[] = {'\\','D','o','s','D','e','v','i','c','e','s','\\',0}; + static const char testdata[] = "Hello World"; ++ static const WCHAR sepW[] = {'\\',0}; + FILE_NETWORK_OPEN_INFORMATION info; + NTSTATUS status; + HANDLE dir, file; +- WCHAR path[MAX_PATH]; ++ WCHAR path[MAX_PATH], temp[MAX_PATH]; + OBJECT_ATTRIBUTES attr; + IO_STATUS_BLOCK io; + UNICODE_STRING nameW; +@@ -327,6 +331,25 @@ static void create_file_test(void) + status = pNtQueryFullAttributesFile( &attr, &info ); + ok( status == STATUS_OBJECT_NAME_INVALID, + "query %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); ++ ++ GetWindowsDirectoryW( path, MAX_PATH ); ++ path[2] = 0; ++ ok( QueryDosDeviceW( path, temp, MAX_PATH ), ++ "QueryDosDeviceW failed with error %u\n", GetLastError() ); ++ lstrcatW( temp, sepW ); ++ lstrcatW( temp, path+3 ); ++ lstrcatW( temp, sepW ); ++ lstrcatW( temp, notepadW ); ++ ++ pRtlInitUnicodeString( &nameW, temp ); ++ status = pNtQueryFullAttributesFile( &attr, &info ); ++ ok( status == STATUS_SUCCESS, ++ "query %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); ++ ++ pRtlInitUnicodeString( &nameW, systemrootExplorerW ); ++ status = pNtQueryFullAttributesFile( &attr, &info ); ++ ok( status == STATUS_SUCCESS, ++ "query %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); + } + + static void open_file_test(void) +diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c +index 31a6c761c7c..83e4810f00b 100644 +--- a/dlls/ntdll/unix/file.c ++++ b/dlls/ntdll/unix/file.c +@@ -2818,16 +2818,10 @@ NTSTATUS CDECL nt_to_unix_file_name_attr( const OBJECT_ATTRIBUTES *attr, ANSI_ST /****************************************************************************** -- * wine_nt_to_unix_file_name (NTDLL.@) Not a Windows API +- * nt_to_unix_file_name - * - * Convert a file name from NT namespace to Unix namespace. - * @@ -25,14 +79,14 @@ index c6249dd8658..242dbd27b2f 100644 - * returned, but the unix name is still filled in properly. + * nt_to_unix_file_name_internal */ --NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret, -- UINT disposition, BOOLEAN check_case ) +-NTSTATUS CDECL nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret, +- UINT disposition, BOOLEAN check_case ) +static NTSTATUS nt_to_unix_file_name_internal( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret, + UINT disposition, BOOLEAN check_case ) { static const WCHAR unixW[] = {'u','n','i','x'}; static const WCHAR pipeW[] = {'p','i','p','e'}; -@@ -2857,6 +2851,126 @@ NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRI +@@ -2940,6 +2934,126 @@ NTSTATUS CDECL nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *u return status; } @@ -103,7 +157,7 @@ index c6249dd8658..242dbd27b2f 100644 +} + +/****************************************************************************** -+ * wine_nt_to_unix_file_name (NTDLL.@) Not a Windows API ++ * nt_to_unix_file_name (NTDLL.@) Not a Windows API + * + * Convert a file name from NT namespace to Unix namespace. + * @@ -111,7 +165,7 @@ index c6249dd8658..242dbd27b2f 100644 + * element doesn't have to exist; in that case STATUS_NO_SUCH_FILE is + * returned, but the unix name is still filled in properly. + */ -+NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret, ++NTSTATUS CDECL nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret, + UINT disposition, BOOLEAN check_case ) +{ + static const WCHAR systemrootW[] = {'\\','S','y','s','t','e','m','R','o','o','t','\\',0}; @@ -157,62 +211,8 @@ index c6249dd8658..242dbd27b2f 100644 + return status; +} - /****************************************************************** - * RtlWow64EnableFsRedirection (NTDLL.@) -diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c -index 546795456a8..709698209d8 100644 ---- a/dlls/ntdll/tests/file.c -+++ b/dlls/ntdll/tests/file.c -@@ -135,18 +135,22 @@ static void WINAPI apc( void *arg, IO_STATUS_BLOCK *iosb, ULONG reserved ) - - static void create_file_test(void) - { -+ static const WCHAR notepadW[] = {'n','o','t','e','p','a','d','.','e','x','e',0}; - static const WCHAR systemrootW[] = {'\\','S','y','s','t','e','m','R','o','o','t', - '\\','f','a','i','l','i','n','g',0}; -+ static const WCHAR systemrootExplorerW[] = {'\\','S','y','s','t','e','m','R','o','o','t', -+ '\\','e','x','p','l','o','r','e','r','.','e','x','e',0}; - static const WCHAR questionmarkInvalidNameW[] = {'a','f','i','l','e','?',0}; - static const WCHAR pipeInvalidNameW[] = {'a','|','b',0}; - static const WCHAR pathInvalidNtW[] = {'\\','\\','?','\\',0}; - static const WCHAR pathInvalidNt2W[] = {'\\','?','?','\\',0}; - static const WCHAR pathInvalidDosW[] = {'\\','D','o','s','D','e','v','i','c','e','s','\\',0}; - static const char testdata[] = "Hello World"; -+ static const WCHAR sepW[] = {'\\',0}; - FILE_NETWORK_OPEN_INFORMATION info; - NTSTATUS status; - HANDLE dir, file; -- WCHAR path[MAX_PATH]; -+ WCHAR path[MAX_PATH], temp[MAX_PATH]; - OBJECT_ATTRIBUTES attr; - IO_STATUS_BLOCK io; - UNICODE_STRING nameW; -@@ -327,6 +331,25 @@ static void create_file_test(void) - status = pNtQueryFullAttributesFile( &attr, &info ); - ok( status == STATUS_OBJECT_NAME_INVALID, - "query %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); -+ -+ GetWindowsDirectoryW( path, MAX_PATH ); -+ path[2] = 0; -+ ok( QueryDosDeviceW( path, temp, MAX_PATH ), -+ "QueryDosDeviceW failed with error %u\n", GetLastError() ); -+ lstrcatW( temp, sepW ); -+ lstrcatW( temp, path+3 ); -+ lstrcatW( temp, sepW ); -+ lstrcatW( temp, notepadW ); -+ -+ pRtlInitUnicodeString( &nameW, temp ); -+ status = pNtQueryFullAttributesFile( &attr, &info ); -+ ok( status == STATUS_SUCCESS, -+ "query %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); -+ -+ pRtlInitUnicodeString( &nameW, systemrootExplorerW ); -+ status = pNtQueryFullAttributesFile( &attr, &info ); -+ ok( status == STATUS_SUCCESS, -+ "query %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - } - - static void open_file_test(void) + /*********************************************************************** + * unmount_device -- -2.26.0 +2.27.0 diff --git a/patches/ntdll-Pipe_SpecialCharacters/0001-ntdll-Allow-special-characters-in-pipe-names.patch b/patches/ntdll-Pipe_SpecialCharacters/0001-ntdll-Allow-special-characters-in-pipe-names.patch index db8af3f4..bdcf5a10 100644 --- a/patches/ntdll-Pipe_SpecialCharacters/0001-ntdll-Allow-special-characters-in-pipe-names.patch +++ b/patches/ntdll-Pipe_SpecialCharacters/0001-ntdll-Allow-special-characters-in-pipe-names.patch @@ -1,4 +1,4 @@ -From fb9f83f9c1043dfff84c51f7223bee172c9ac40f Mon Sep 17 00:00:00 2001 +From d4166e5e9761c9a3d896486b1eb2582ca6f20482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 27 Jul 2014 03:35:42 +0200 Subject: [PATCH] ntdll: Allow special characters in pipe names. @@ -6,7 +6,7 @@ Subject: [PATCH] ntdll: Allow special characters in pipe names. Based on patch by Valentyn Pavliuchenko. --- dlls/kernel32/tests/pipe.c | 10 ++++++++++ - dlls/ntdll/directory.c | 14 ++++++++++---- + dlls/ntdll/unix/file.c | 14 ++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c @@ -37,19 +37,19 @@ index 3c7ca06a045..453dcc80b7b 100644 if (winetest_debug > 1) trace("test_CreateNamedPipe returning\n"); } -diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c -index 993a661015e..aaf7c6eeed4 100644 ---- a/dlls/ntdll/directory.c -+++ b/dlls/ntdll/directory.c -@@ -2747,6 +2747,7 @@ NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRI - UINT disposition, BOOLEAN check_case ) +diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c +index 13096e085e8..31a6c761c7c 100644 +--- a/dlls/ntdll/unix/file.c ++++ b/dlls/ntdll/unix/file.c +@@ -2830,6 +2830,7 @@ NTSTATUS CDECL nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *u + UINT disposition, BOOLEAN check_case ) { static const WCHAR unixW[] = {'u','n','i','x'}; + static const WCHAR pipeW[] = {'p','i','p','e'}; static const WCHAR invalid_charsW[] = { INVALID_NT_CHARS, 0 }; NTSTATUS status = STATUS_SUCCESS; -@@ -2757,6 +2758,7 @@ NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRI +@@ -2839,6 +2840,7 @@ NTSTATUS CDECL nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *u int pos, ret, name_len, unix_len, prefix_len; WCHAR prefix[MAX_DIR_ENTRY_LEN + 1]; BOOLEAN is_unix = FALSE; @@ -57,7 +57,7 @@ index 993a661015e..aaf7c6eeed4 100644 name = nameW->Buffer; name_len = nameW->Length / sizeof(WCHAR); -@@ -2792,13 +2794,17 @@ NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRI +@@ -2872,13 +2874,17 @@ NTSTATUS CDECL nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *u name += prefix_len; name_len -= prefix_len; @@ -80,5 +80,5 @@ index 993a661015e..aaf7c6eeed4 100644 else { -- -2.25.1 +2.27.0 diff --git a/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch b/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch index 6aaf9caa..9164fea5 100644 --- a/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch +++ b/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch @@ -1,4 +1,4 @@ -From a660effad7b09d7333aa46f9bbef45eb4c1bed3d Mon Sep 17 00:00:00 2001 +From 74831302b4eedd6df46357de283392f2b4ee62f2 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 30 Dec 2019 13:27:53 +0300 Subject: [PATCH] ntdll: Support x86_64 syscall emulation. @@ -14,15 +14,15 @@ is used for trapping syscalls. dlls/ntdll/unix/signal_x86_64.c | 105 ++++++++++++++++++++++++++++++++ dlls/ntdll/unix/thread.c | 8 ++- dlls/ntdll/unix/unix_private.h | 6 +- - dlls/ntdll/unixlib.h | 3 +- + dlls/ntdll/unixlib.h | 5 +- tools/winebuild/spec32.c | 9 ++- - 7 files changed, 134 insertions(+), 6 deletions(-) + 7 files changed, 135 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac -index 5418d1aa732..d82069e7457 100644 +index 8a76b74e83d..d67c0be3617 100644 --- a/configure.ac +++ b/configure.ac -@@ -474,6 +474,7 @@ AC_CHECK_HEADERS(\ +@@ -464,6 +464,7 @@ AC_CHECK_HEADERS(\ linux/joystick.h \ linux/major.h \ linux/param.h \ @@ -31,10 +31,10 @@ index 5418d1aa732..d82069e7457 100644 linux/types.h \ linux/ucdrom.h \ diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c -index a14e3a12ae0..a0411446e24 100644 +index 8295b7559e7..052035750cf 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c -@@ -229,6 +229,12 @@ void __wine_syscall_dispatcher( void ) +@@ -179,6 +179,12 @@ void __wine_syscall_dispatcher( void ) } #endif @@ -47,7 +47,7 @@ index a14e3a12ae0..a0411446e24 100644 void *WINAPI __wine_fakedll_dispatcher( const char *module, ULONG ord ) { UNICODE_STRING name; -@@ -272,7 +278,7 @@ void *WINAPI __wine_fakedll_dispatcher( const char *module, ULONG ord ) +@@ -222,7 +228,7 @@ void *WINAPI __wine_fakedll_dispatcher( const char *module, ULONG ord ) TEB *thread_init( SIZE_T *info_size, BOOL *suspend ) { TEB *teb = unix_funcs->init_threading( &nb_threads, &__wine_ldt_copy, info_size, suspend, &server_cpus, @@ -227,10 +227,10 @@ index e1da90222d3..91e1596ddcb 100644 teb = virtual_alloc_first_teb(); teb->WOW32Reserved = syscall_handler; diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h -index 75594832572..e42fa44f9a0 100644 +index 62e836b41f1..f234a756991 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h -@@ -112,7 +112,8 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd ) DECLSPEC_HIDDE +@@ -111,7 +111,8 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd ) DECLSPEC_HIDDE extern void CDECL server_init_process_done( void *relay ) DECLSPEC_HIDDEN; extern TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size, BOOL *suspend, unsigned int *cpus, BOOL *wow64, @@ -240,9 +240,9 @@ index 75594832572..e42fa44f9a0 100644 extern void CDECL DECLSPEC_NORETURN exit_thread( int status ) DECLSPEC_HIDDEN; extern void CDECL DECLSPEC_NORETURN exit_process( int status ) DECLSPEC_HIDDEN; extern NTSTATUS CDECL get_thread_ldt_entry( HANDLE handle, void *data, ULONG len, ULONG *ret_len ) DECLSPEC_HIDDEN; -@@ -132,6 +133,9 @@ extern struct _KUSER_SHARED_DATA *user_shared_data DECLSPEC_HIDDEN; - extern void init_environment( int argc, char *argv[], char *envp[] ) DECLSPEC_HIDDEN; - extern DWORD ntdll_umbstowcs( const char *src, DWORD srclen, WCHAR *dst, DWORD dstlen ) DECLSPEC_HIDDEN; +@@ -150,6 +151,9 @@ extern char **build_envp( const WCHAR *envW ) DECLSPEC_HIDDEN; + extern NTSTATUS exec_wineloader( char **argv, int socketfd, int is_child_64bit, + ULONGLONG res_start, ULONGLONG res_end ) DECLSPEC_HIDDEN; +extern unsigned int __wine_nb_syscalls DECLSPEC_HIDDEN; +extern void *__wine_syscall_dispatcher DECLSPEC_HIDDEN; @@ -251,10 +251,19 @@ index 75594832572..e42fa44f9a0 100644 extern void server_enter_uninterrupted_section( RTL_CRITICAL_SECTION *cs, sigset_t *sigset ) DECLSPEC_HIDDEN; extern void server_leave_uninterrupted_section( RTL_CRITICAL_SECTION *cs, sigset_t *sigset ) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h -index 63d0a519b74..92762e802ee 100644 +index c6fb8e0f2d4..5d00991cde9 100644 --- a/dlls/ntdll/unixlib.h +++ b/dlls/ntdll/unixlib.h -@@ -204,7 +204,8 @@ struct unix_funcs +@@ -28,7 +28,7 @@ struct ldt_copy; + struct msghdr; + + /* increment this when you change the function table */ +-#define NTDLL_UNIXLIB_VERSION 45 ++#define NTDLL_UNIXLIB_VERSION 46 + + struct unix_funcs + { +@@ -225,7 +225,8 @@ struct unix_funcs /* thread/process functions */ TEB * (CDECL *init_threading)( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size, @@ -306,5 +315,5 @@ index 9cc4698d0d7..c572fe49923 100644 put_byte( 0x08 ); put_byte( 0x03 ); put_byte( 0xfe ); put_byte( 0x7f ); put_byte( 0x01 ); -- -2.26.2 +2.27.0 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 795604b4..046f3fa0 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "22970932d014f024fcf7f0f98b1a5384b1b1eb99" + echo "948a6a47b8dbd0ddd86cad04de03f0e4ba81b65d" } # Show version information @@ -167,7 +167,6 @@ patch_enable_all () enable_ntdll_ApiSetMap="$1" enable_ntdll_Builtin_Prot="$1" enable_ntdll_CriticalSection="$1" - enable_ntdll_DOS_Attributes="$1" enable_ntdll_Dealloc_Thread_Stack="$1" enable_ntdll_DeviceType_Systemroot="$1" enable_ntdll_Exception="$1" @@ -228,14 +227,12 @@ patch_enable_all () enable_server_Desktop_Refcount="$1" enable_server_FileEndOfFileInformation="$1" enable_server_File_Permissions="$1" - enable_server_Inherited_ACLs="$1" enable_server_Key_State="$1" enable_server_Object_Types="$1" enable_server_PeekMessage="$1" enable_server_Realtime_Priority="$1" enable_server_Registry_Notifications="$1" enable_server_Signal_Thread="$1" - enable_server_Stored_ACLs="$1" enable_setupapi_DiskSpaceList="$1" enable_setupapi_SPFILENOTIFY_FILEINCABINET="$1" enable_shdocvw_ParseURLFromOutsideSource_Tests="$1" @@ -599,9 +596,6 @@ patch_enable () ntdll-CriticalSection) enable_ntdll_CriticalSection="$2" ;; - ntdll-DOS_Attributes) - enable_ntdll_DOS_Attributes="$2" - ;; ntdll-Dealloc_Thread_Stack) enable_ntdll_Dealloc_Thread_Stack="$2" ;; @@ -782,9 +776,6 @@ patch_enable () server-File_Permissions) enable_server_File_Permissions="$2" ;; - server-Inherited_ACLs) - enable_server_Inherited_ACLs="$2" - ;; server-Key_State) enable_server_Key_State="$2" ;; @@ -803,9 +794,6 @@ patch_enable () server-Signal_Thread) enable_server_Signal_Thread="$2" ;; - server-Stored_ACLs) - enable_server_Stored_ACLs="$2" - ;; setupapi-DiskSpaceList) enable_setupapi_DiskSpaceList="$2" ;; @@ -1608,24 +1596,6 @@ if test "$enable_server_Realtime_Priority" -eq 1; then enable_ntdll_ThreadTime=1 fi -if test "$enable_server_Inherited_ACLs" -eq 1; then - if test "$enable_server_Stored_ACLs" -gt 1; then - abort "Patchset server-Stored_ACLs disabled, but server-Inherited_ACLs depends on that." - fi - enable_server_Stored_ACLs=1 -fi - -if test "$enable_server_Stored_ACLs" -eq 1; then - if test "$enable_ntdll_DOS_Attributes" -gt 1; then - abort "Patchset ntdll-DOS_Attributes disabled, but server-Stored_ACLs depends on that." - fi - if test "$enable_server_File_Permissions" -gt 1; then - abort "Patchset server-File_Permissions disabled, but server-Stored_ACLs depends on that." - fi - enable_ntdll_DOS_Attributes=1 - enable_server_File_Permissions=1 -fi - if test "$enable_server_Desktop_Refcount" -eq 1; then if test "$enable_ws2_32_WSACleanup" -gt 1; then abort "Patchset ws2_32-WSACleanup disabled, but server-Desktop_Refcount depends on that." @@ -1704,13 +1674,6 @@ if test "$enable_ntdll_Hide_Wine_Exports" -eq 1; then enable_ntdll_ThreadTime=1 fi -if test "$enable_ntdll_DOS_Attributes" -eq 1; then - if test "$enable_ntdll_Junction_Points" -gt 1; then - abort "Patchset ntdll-Junction_Points disabled, but ntdll-DOS_Attributes depends on that." - fi - enable_ntdll_Junction_Points=1 -fi - if test "$enable_ntdll_Builtin_Prot" -eq 1; then if test "$enable_ntdll_WRITECOPY" -gt 1; then abort "Patchset ntdll-WRITECOPY disabled, but ntdll-Builtin_Prot depends on that." @@ -3214,7 +3177,7 @@ fi # | * [#44948] Multiple apps (Spine (Mod starter for Gothic), MS Office 365 installer) need CreateSymbolicLinkW implementation # | # | Modified files: -# | * configure.ac, dlls/kernel32/path.c, dlls/ntdll/directory.c, dlls/ntdll/file.c, dlls/ntdll/tests/file.c, +# | * configure.ac, dlls/kernel32/path.c, dlls/ntdll/file.c, dlls/ntdll/tests/file.c, dlls/ntdll/unix/file.c, # | include/Makefile.in, include/ntifs.h, include/wine/port.h, include/winternl.h, libs/port/Makefile.in, # | libs/port/renameat2.c, server/fd.c # | @@ -3719,40 +3682,6 @@ if test "$enable_ntdll_CriticalSection" -eq 1; then ) >> "$patchlist" fi -# Patchset ntdll-DOS_Attributes -# | -# | This patchset has the following (direct or indirect) dependencies: -# | * ntdll-Junction_Points -# | -# | This patchset fixes the following Wine bugs: -# | * [#9158] Support for DOS hidden/system file attributes -# | * [#15679] cygwin symlinks not working in wine -# | -# | Modified files: -# | * configure.ac, dlls/ntdll/directory.c, dlls/ntdll/file.c, dlls/ntdll/ntdll_misc.h, dlls/ntdll/tests/directory.c, -# | dlls/ntdll/tests/file.c, include/wine/port.h, libs/port/Makefile.in, libs/port/xattr.c -# | -if test "$enable_ntdll_DOS_Attributes" -eq 1; then - patch_apply ntdll-DOS_Attributes/0001-ntdll-Implement-retrieving-DOS-attributes-in-NtQuery.patch - patch_apply ntdll-DOS_Attributes/0002-ntdll-Implement-retrieving-DOS-attributes-in-NtQuery.patch - patch_apply ntdll-DOS_Attributes/0003-ntdll-Implement-storing-DOS-attributes-in-NtSetInfor.patch - patch_apply ntdll-DOS_Attributes/0004-ntdll-Implement-storing-DOS-attributes-in-NtCreateFi.patch - patch_apply ntdll-DOS_Attributes/0005-libport-Add-support-for-Mac-OS-X-style-extended-attr.patch - patch_apply ntdll-DOS_Attributes/0006-libport-Add-support-for-FreeBSD-style-extended-attri.patch - patch_apply ntdll-DOS_Attributes/0007-ntdll-Perform-the-Unix-style-hidden-file-check-withi.patch - patch_apply ntdll-DOS_Attributes/0008-ntdll-Always-store-SAMBA_XATTR_DOS_ATTRIB-when-path-.patch - ( - printf '%s\n' '+ { "Erich E. Hoover", "ntdll: Implement retrieving DOS attributes in NtQueryInformationFile.", 1 },'; - printf '%s\n' '+ { "Erich E. Hoover", "ntdll: Implement retrieving DOS attributes in NtQuery[Full]AttributesFile and NtQueryDirectoryFile.", 1 },'; - printf '%s\n' '+ { "Erich E. Hoover", "ntdll: Implement storing DOS attributes in NtSetInformationFile.", 1 },'; - printf '%s\n' '+ { "Erich E. Hoover", "ntdll: Implement storing DOS attributes in NtCreateFile.", 1 },'; - printf '%s\n' '+ { "Erich E. Hoover", "libport: Add support for Mac OS X style extended attributes.", 1 },'; - printf '%s\n' '+ { "Erich E. Hoover", "libport: Add support for FreeBSD style extended attributes.", 1 },'; - printf '%s\n' '+ { "Erich E. Hoover", "ntdll: Perform the Unix-style hidden file check within the unified file info grabbing routine.", 1 },'; - printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Always store SAMBA_XATTR_DOS_ATTRIB when path could be interpreted as hidden.", 1 },'; - ) >> "$patchlist" -fi - # Patchset ntdll-Dealloc_Thread_Stack # | # | Modified files: @@ -3972,7 +3901,7 @@ fi # | * [#28995] Allow special characters in pipe names # | # | Modified files: -# | * dlls/kernel32/tests/pipe.c, dlls/ntdll/directory.c +# | * dlls/kernel32/tests/pipe.c, dlls/ntdll/unix/file.c # | if test "$enable_ntdll_Pipe_SpecialCharacters" -eq 1; then patch_apply ntdll-Pipe_SpecialCharacters/0001-ntdll-Allow-special-characters-in-pipe-names.patch @@ -3990,7 +3919,7 @@ fi # | * [#37487] Resolve \\SystemRoot\\ prefix when opening files # | # | Modified files: -# | * dlls/ntdll/directory.c, dlls/ntdll/tests/file.c +# | * dlls/ntdll/tests/file.c, dlls/ntdll/unix/file.c # | if test "$enable_ntdll_NtDevicePath" -eq 1; then patch_apply ntdll-NtDevicePath/0001-ntdll-Implement-opening-files-through-nt-device-path.patch @@ -4677,52 +4606,6 @@ if test "$enable_server_FileEndOfFileInformation" -eq 1; then ) >> "$patchlist" fi -# Patchset server-Stored_ACLs -# | -# | This patchset has the following (direct or indirect) dependencies: -# | * ntdll-Junction_Points, ntdll-DOS_Attributes, server-File_Permissions -# | -# | This patchset fixes the following Wine bugs: -# | * [#33576] Support for stored file ACLs -# | -# | Modified files: -# | * dlls/advapi32/tests/security.c, include/wine/port.h, server/change.c, server/file.c, server/file.h, server/object.c, -# | server/object.h -# | -if test "$enable_server_Stored_ACLs" -eq 1; then - patch_apply server-Stored_ACLs/0001-server-Unify-the-storage-of-security-attributes-for-.patch - patch_apply server-Stored_ACLs/0002-server-Unify-the-retrieval-of-security-attributes-fo.patch - patch_apply server-Stored_ACLs/0003-server-Add-a-helper-function-set_sd_from_token_inter.patch - patch_apply server-Stored_ACLs/0004-server-Temporarily-store-the-full-security-descripto.patch - patch_apply server-Stored_ACLs/0005-server-Store-file-security-attributes-with-extended-.patch - patch_apply server-Stored_ACLs/0006-server-Convert-return-of-file-security-masks-with-ge.patch - patch_apply server-Stored_ACLs/0007-server-Retrieve-file-security-attributes-with-extend.patch - ( - printf '%s\n' '+ { "Erich E. Hoover", "server: Unify the storage of security attributes for files and directories.", 7 },'; - printf '%s\n' '+ { "Erich E. Hoover", "server: Unify the retrieval of security attributes for files and directories.", 7 },'; - printf '%s\n' '+ { "Sebastian Lackner", "server: Add a helper function set_sd_from_token_internal to merge two security descriptors.", 1 },'; - printf '%s\n' '+ { "Sebastian Lackner", "server: Temporarily store the full security descriptor for file objects.", 1 },'; - printf '%s\n' '+ { "Erich E. Hoover", "server: Store file security attributes with extended file attributes.", 8 },'; - printf '%s\n' '+ { "Erich E. Hoover", "server: Convert return of file security masks with generic access mappings.", 7 },'; - printf '%s\n' '+ { "Erich E. Hoover", "server: Retrieve file security attributes with extended file attributes.", 7 },'; - ) >> "$patchlist" -fi - -# Patchset server-Inherited_ACLs -# | -# | This patchset has the following (direct or indirect) dependencies: -# | * ntdll-Junction_Points, ntdll-DOS_Attributes, server-File_Permissions, server-Stored_ACLs -# | -# | Modified files: -# | * dlls/advapi32/tests/security.c, server/file.c -# | -if test "$enable_server_Inherited_ACLs" -eq 1; then - patch_apply server-Inherited_ACLs/0001-server-Inherit-security-attributes-from-parent-direc.patch - ( - printf '%s\n' '+ { "Erich E. Hoover", "server: Inherit security attributes from parent directories on creation.", 7 },'; - ) >> "$patchlist" -fi - # Patchset server-Key_State # | # | This patchset fixes the following Wine bugs: @@ -6644,6 +6527,7 @@ if test "$enable_xactengine_initial" -eq 1; then patch_apply xactengine-initial/0014-include-Add-XACTENGINE_-error-codes.patch patch_apply xactengine-initial/0015-include-Add-XACT-defines.patch patch_apply xactengine-initial/0016-xaudio2_7-tests-Add-more-tests.patch + patch_apply xactengine-initial/0017-include-Correct-the-name-of-WAVEBANKMINIWAVEFORMAT.patch ( printf '%s\n' '+ { "Ethan Lee", "include: Add xact3.idl.", 1 },'; printf '%s\n' '+ { "Ethan Lee", "xaudio2: Add support for xactengine3.", 1 },'; @@ -6660,6 +6544,7 @@ if test "$enable_xactengine_initial" -eq 1; then printf '%s\n' '+ { "Alistair Leslie-Hughes", "include: Add XACTENGINE_* error codes.", 1 },'; printf '%s\n' '+ { "Alistair Leslie-Hughes", "include: Add XACT defines.", 1 },'; printf '%s\n' '+ { "Alistair Leslie-Hughes", "xaudio2_7/tests: Add more tests.", 1 },'; + printf '%s\n' '+ { "Zebediah Figura", "include: Correct the name of WAVEBANKMINIWAVEFORMAT.", 1 },'; ) >> "$patchlist" fi diff --git a/patches/server-Inherited_ACLs/definition b/patches/server-Inherited_ACLs/definition index 4dd0f1e9..47a12d72 100644 --- a/patches/server-Inherited_ACLs/definition +++ b/patches/server-Inherited_ACLs/definition @@ -1,2 +1,4 @@ Depends: server-Stored_ACLs Fixes: Support for inherited file ACLs +# Re-enable me when ntdll-DOS_Attributes gets re-enabled! +Disabled: true diff --git a/patches/server-Stored_ACLs/definition b/patches/server-Stored_ACLs/definition index 03222c47..c2f25c70 100644 --- a/patches/server-Stored_ACLs/definition +++ b/patches/server-Stored_ACLs/definition @@ -1,3 +1,5 @@ Depends: ntdll-DOS_Attributes Depends: server-File_Permissions Fixes: [33576] Support for stored file ACLs +# Re-enable me when ntdll-DOS_Attributes gets re-enabled! +Disabled: true diff --git a/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch b/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch index b78ca856..695c5855 100644 --- a/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch +++ b/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch @@ -1,4 +1,4 @@ -From 531ffc16d33f96bfeb65973efd1cdbd22fb6a32f Mon Sep 17 00:00:00 2001 +From 607a86f034677449a7fa4628ec2df013b65bfa90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 11 May 2017 05:32:55 +0200 Subject: [PATCH] winebuild: Generate syscall thunks for ntdll exports. @@ -22,10 +22,10 @@ Based on a patch by Erich E. Hoover. 14 files changed, 221 insertions(+), 32 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 2553b0b9d39..cac6aae2f3d 100644 +index c2e65c94abc..0f9fe76e9af 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -4021,6 +4021,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule) +@@ -3812,6 +3812,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule) return ret; } @@ -33,7 +33,7 @@ index 2553b0b9d39..cac6aae2f3d 100644 /****************************************************************** * LdrInitializeThunk (NTDLL.@) -@@ -4038,6 +4039,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow +@@ -3828,6 +3829,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow WINE_MODREF *wm; LPCWSTR load_path = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer; @@ -65,7 +65,7 @@ index 21cc1b3ead4..18be5693a7d 100644 } return unix_funcs->NtGetContextThread( handle, context ); diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c -index 1389a542cde..54796476e25 100644 +index a5e6faa461a..51938bf84cc 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -1643,6 +1643,8 @@ static void test_thread_context(void) @@ -78,10 +78,10 @@ index 1389a542cde..54796476e25 100644 ok( context.SegCs == LOWORD(expect.SegCs), "wrong SegCs %08x/%08x\n", context.SegCs, expect.SegCs ); ok( context.SegDs == LOWORD(expect.SegDs), "wrong SegDs %08x/%08x\n", context.SegDs, expect.SegDs ); diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c -index ff5fe9d6226..e93498b27ea 100644 +index 5a6809638ae..c6988ce08e3 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c -@@ -220,6 +220,14 @@ int __cdecl __wine_dbg_output( const char *str ) +@@ -170,6 +170,14 @@ int __cdecl __wine_dbg_output( const char *str ) return unix_funcs->dbg_output( str ); } @@ -96,7 +96,7 @@ index ff5fe9d6226..e93498b27ea 100644 /*********************************************************************** * thread_init -@@ -231,7 +239,7 @@ int __cdecl __wine_dbg_output( const char *str ) +@@ -181,7 +189,7 @@ int __cdecl __wine_dbg_output( const char *str ) TEB *thread_init( SIZE_T *info_size, BOOL *suspend ) { TEB *teb = unix_funcs->init_threading( &nb_threads, &__wine_ldt_copy, info_size, suspend, &server_cpus, @@ -127,10 +127,10 @@ index 97b191e1a5b..2dbaa43e731 100644 thread_data->request_fd = -1; thread_data->reply_fd = -1; diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h -index e26a64fdac0..e93d8f21d10 100644 +index abedfc316ae..62d0c115026 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h -@@ -112,7 +112,7 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd ) DECLSPEC_HIDDE +@@ -111,7 +111,7 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd ) DECLSPEC_HIDDE extern void CDECL server_init_process_done( void *relay ) DECLSPEC_HIDDEN; extern TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size, BOOL *suspend, unsigned int *cpus, BOOL *wow64, @@ -140,19 +140,19 @@ index e26a64fdac0..e93d8f21d10 100644 extern void CDECL DECLSPEC_NORETURN exit_process( int status ) DECLSPEC_HIDDEN; extern NTSTATUS CDECL get_thread_ldt_entry( HANDLE handle, void *data, ULONG len, ULONG *ret_len ) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h -index 768ab5b006c..63d0a519b74 100644 +index 873cc7abdf2..c6fb8e0f2d4 100644 --- a/dlls/ntdll/unixlib.h +++ b/dlls/ntdll/unixlib.h @@ -28,7 +28,7 @@ struct ldt_copy; struct msghdr; /* increment this when you change the function table */ --#define NTDLL_UNIXLIB_VERSION 41 -+#define NTDLL_UNIXLIB_VERSION 42 +-#define NTDLL_UNIXLIB_VERSION 44 ++#define NTDLL_UNIXLIB_VERSION 45 struct unix_funcs { -@@ -204,7 +204,7 @@ struct unix_funcs +@@ -225,7 +225,7 @@ struct unix_funcs /* thread/process functions */ TEB * (CDECL *init_threading)( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size, @@ -162,10 +162,10 @@ index 768ab5b006c..63d0a519b74 100644 void (CDECL *exit_process)( int status ); NTSTATUS (CDECL *get_thread_ldt_entry)( HANDLE handle, void *data, ULONG len, ULONG *ret_len ); diff --git a/include/winternl.h b/include/winternl.h -index 2d9f54b89d8..0c15a0ee6c3 100644 +index 04e5dd1f62f..2b9a12cbb31 100644 --- a/include/winternl.h +++ b/include/winternl.h -@@ -360,7 +360,7 @@ typedef struct _TEB +@@ -359,7 +359,7 @@ typedef struct _TEB PVOID CsrClientThread; /* 03c/0070 */ PVOID Win32ThreadInfo; /* 040/0078 */ ULONG Win32ClientInfo[31]; /* 044/0080 used for user32 private data in Wine */ @@ -559,5 +559,5 @@ index 2a1fc960926..07a579004ad 100644 + return j + 1; +} -- -2.26.2 +2.27.0 diff --git a/patches/winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch b/patches/winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch index caeecbd5..c72b5f04 100644 --- a/patches/winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch +++ b/patches/winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch @@ -1,4 +1,4 @@ -From 9c83eae2b95981ba4ca812bacbf116eaf412a218 Mon Sep 17 00:00:00 2001 +From 6de6fba2c1135044da2a9958df07772f00784de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 5 Nov 2015 14:33:48 +0100 Subject: [PATCH] winex11.drv: Allow to select default display frequency in @@ -17,7 +17,7 @@ HKCU\Software\Wine\X11 Driver\DefaultDisplayFrequency 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c -index c3f31d0430d..5e01b31106e 100644 +index bbbb6fdf0a3..82120cdbc2a 100644 --- a/dlls/winex11.drv/settings.c +++ b/dlls/winex11.drv/settings.c @@ -378,7 +378,7 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, @@ -43,7 +43,7 @@ index c3f31d0430d..5e01b31106e 100644 } - if ((devmode->dmFields & DM_DISPLAYFREQUENCY) && (dd_modes[i].refresh_rate != 0) && + if ((devmode->dmFields & DM_DISPLAYFREQUENCY) && - devmode->dmDisplayFrequency != 0) + devmode->dmDisplayFrequency != 0 && devmode->dmDisplayFrequency != 1) { - if (devmode->dmDisplayFrequency != dd_modes[i].refresh_rate) + if (dd_modes[i].refresh_rate != 0 && @@ -109,10 +109,10 @@ index c3f31d0430d..5e01b31106e 100644 + return DISP_CHANGE_SUCCESSFUL; } diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h -index c2c845503e6..85a1a46788b 100644 +index a9eaed20cab..76e1344a616 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h -@@ -403,6 +403,7 @@ extern BOOL private_color_map DECLSPEC_HIDDEN; +@@ -404,6 +404,7 @@ extern BOOL private_color_map DECLSPEC_HIDDEN; extern int primary_monitor DECLSPEC_HIDDEN; extern int copy_default_colors DECLSPEC_HIDDEN; extern int alloc_system_colors DECLSPEC_HIDDEN; @@ -121,7 +121,7 @@ index c2c845503e6..85a1a46788b 100644 extern HMODULE x11drv_module DECLSPEC_HIDDEN; extern char *process_name DECLSPEC_HIDDEN; diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c -index f08ac92e36f..f9fe5234c57 100644 +index e6e61e801e1..6b82784c5f9 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -85,6 +85,7 @@ BOOL client_side_with_render = TRUE; @@ -132,7 +132,7 @@ index f08ac92e36f..f9fe5234c57 100644 DWORD thread_data_tls_index = TLS_OUT_OF_INDEXES; int xrender_error_base = 0; HMODULE x11drv_module = 0; -@@ -437,6 +438,9 @@ static void setup_options(void) +@@ -435,6 +436,9 @@ static void setup_options(void) if (!get_config_key( hkey, appkey, "AllocSystemColors", buffer, sizeof(buffer) )) alloc_system_colors = atoi(buffer); @@ -143,5 +143,5 @@ index f08ac92e36f..f9fe5234c57 100644 if (appkey) RegCloseKey( appkey ); -- -2.26.2 +2.27.0 diff --git a/patches/ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch b/patches/ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch index f59482fe..92f9f472 100644 --- a/patches/ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch +++ b/patches/ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch @@ -1,4 +1,4 @@ -From b8b29d74bc946a359d9296a051371b78f88570d5 Mon Sep 17 00:00:00 2001 +From 85887cf68b055ca7149a428b32e9cac31e2190ca Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 6 Sep 2015 12:41:17 +0200 Subject: [PATCH] ws2_32: Invalidate client-side file descriptor cache in @@ -17,10 +17,10 @@ Subject: [PATCH] ws2_32: Invalidate client-side file descriptor cache in 9 files changed, 36 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index a9422723b71..e4f2f0e9c2b 100644 +index 0b0d4587969..99d4c57cdfe 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec -@@ -1578,6 +1578,7 @@ +@@ -1577,6 +1577,7 @@ # Server interface @ cdecl -norelay wine_server_call(ptr) @@ -48,11 +48,11 @@ index 9e1cc85a36e..3f4ba60b7bb 100644 /*********************************************************************** * wine_server_release_fd (NTDLL.@) diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c -index 370a57dea9e..29d7c1c681c 100644 +index b09049b855b..bd37b8362b0 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c -@@ -927,6 +927,7 @@ static struct unix_funcs unix_funcs = - get_thread_ldt_entry, +@@ -937,6 +937,7 @@ static struct unix_funcs unix_funcs = + fork_and_exec, wine_server_call, server_send_fd, + server_remove_fds_from_cache_by_type, @@ -60,10 +60,10 @@ index 370a57dea9e..29d7c1c681c 100644 server_fd_to_handle, server_handle_to_fd, diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c -index 5faca657783..2e278480896 100644 +index cf6f6c3832c..586d0ffcf72 100644 --- a/dlls/ntdll/unix/server.c +++ b/dlls/ntdll/unix/server.c -@@ -1003,6 +1003,26 @@ static int remove_fd_from_cache( HANDLE handle ) +@@ -995,6 +995,26 @@ static int remove_fd_from_cache( HANDLE handle ) return fd; } @@ -91,10 +91,10 @@ index 5faca657783..2e278480896 100644 /*********************************************************************** * server_get_unix_fd diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h -index d2586556f6e..e26a64fdac0 100644 +index e82b0960343..673d01c6bf9 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h -@@ -100,6 +100,7 @@ extern void CDECL virtual_release_address_space(void) DECLSPEC_HIDDEN; +@@ -99,6 +99,7 @@ extern void CDECL virtual_release_address_space(void) DECLSPEC_HIDDEN; extern void CDECL virtual_set_large_address_space(void) DECLSPEC_HIDDEN; extern void CDECL server_send_fd( int fd ) DECLSPEC_HIDDEN; @@ -103,19 +103,19 @@ index d2586556f6e..e26a64fdac0 100644 int *needs_close, enum server_fd_type *type, unsigned int *options ) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h -index 54705b7f6d2..768ab5b006c 100644 +index 958fab4c059..873cc7abdf2 100644 --- a/dlls/ntdll/unixlib.h +++ b/dlls/ntdll/unixlib.h @@ -28,7 +28,7 @@ struct ldt_copy; struct msghdr; /* increment this when you change the function table */ --#define NTDLL_UNIXLIB_VERSION 40 -+#define NTDLL_UNIXLIB_VERSION 41 +-#define NTDLL_UNIXLIB_VERSION 43 ++#define NTDLL_UNIXLIB_VERSION 44 struct unix_funcs { -@@ -212,6 +212,7 @@ struct unix_funcs +@@ -239,6 +239,7 @@ struct unix_funcs /* server functions */ unsigned int (CDECL *server_call)( void *req_ptr ); void (CDECL *server_send_fd)( int fd ); @@ -164,5 +164,5 @@ index ac5dcc6f8bc..5cf52887516 100644 /* do a server call and set the last error code */ static inline unsigned int wine_server_call_err( void *req_ptr ) -- -2.26.2 +2.27.0 diff --git a/patches/xactengine-initial/0001-include-Add-xact3.idl.patch b/patches/xactengine-initial/0001-include-Add-xact3.idl.patch index 5dd31d22..c7837f34 100644 --- a/patches/xactengine-initial/0001-include-Add-xact3.idl.patch +++ b/patches/xactengine-initial/0001-include-Add-xact3.idl.patch @@ -1,4 +1,4 @@ -From fa4b6d66242136e922620295da4a22a7431d17fe Mon Sep 17 00:00:00 2001 +From 1528db6daac145ca3444b432382c8e4b8fd15a5d Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Wed, 22 Jan 2020 00:12:10 +0000 Subject: [PATCH] include: Add xact3.idl @@ -7,15 +7,14 @@ Signed-off-by: Alistair Leslie-Hughes --- include/Makefile.in | 1 + include/xact3.idl | 533 ++++++++++++++++++++++++++++++++++++++++++++ - include/xact3wb.h | 2 + - 3 files changed, 536 insertions(+) + 2 files changed, 534 insertions(+) create mode 100644 include/xact3.idl diff --git a/include/Makefile.in b/include/Makefile.in -index ce0f6fc433..faba1622d9 100644 +index 9f70e72b4c7..200d4a69423 100644 --- a/include/Makefile.in +++ b/include/Makefile.in -@@ -784,6 +784,7 @@ SOURCES = \ +@@ -802,6 +802,7 @@ SOURCES = \ wtypes.idl \ wuapi.idl \ x3daudio.h \ @@ -25,7 +24,7 @@ index ce0f6fc433..faba1622d9 100644 xapofx.h \ diff --git a/include/xact3.idl b/include/xact3.idl new file mode 100644 -index 0000000000..c49718ff39 +index 00000000000..c49718ff393 --- /dev/null +++ b/include/xact3.idl @@ -0,0 +1,533 @@ @@ -562,19 +561,6 @@ index 0000000000..c49718ff39 + + HRESULT GetProperties(XACT_WAVE_INSTANCE_PROPERTIES *pProperties); +} -diff --git a/include/xact3wb.h b/include/xact3wb.h -index b4c5a53d40..130efc9745 100644 ---- a/include/xact3wb.h -+++ b/include/xact3wb.h -@@ -18,6 +18,8 @@ - #ifndef __XACT3WB_H__ - #define __XACT3WB_H__ - -+#define WAVEBANK_ENTRYNAME_LENGTH 64 -+ - typedef union WAVEBANKMINIWAVEFORMAT - { - struct -- -2.25.1 +2.27.0 diff --git a/patches/xactengine-initial/0017-include-Correct-the-name-of-WAVEBANKMINIWAVEFORMAT.patch b/patches/xactengine-initial/0017-include-Correct-the-name-of-WAVEBANKMINIWAVEFORMAT.patch new file mode 100644 index 00000000..c7d574f9 --- /dev/null +++ b/patches/xactengine-initial/0017-include-Correct-the-name-of-WAVEBANKMINIWAVEFORMAT.patch @@ -0,0 +1,26 @@ +From e8e4434d2a8edf0b964ed0e93500b20718ba961d Mon Sep 17 00:00:00 2001 +From: Zebediah Figura +Date: Fri, 12 Jun 2020 17:59:11 -0500 +Subject: [PATCH] include: Correct the name of WAVEBANKMINIWAVEFORMAT. + +Signed-off-by: Zebediah Figura +--- + include/xact3wb.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/xact3wb.h b/include/xact3wb.h +index c68d7a30fad..81b1518930d 100644 +--- a/include/xact3wb.h ++++ b/include/xact3wb.h +@@ -138,7 +138,7 @@ typedef struct WAVEBANKDATA + DWORD dwEntryMetaDataElementSize; + DWORD dwEntryNameElementSize; + DWORD dwAlignment; +- WAVEBANKMINIFORMAT CompactFormat; ++ WAVEBANKMINIWAVEFORMAT CompactFormat; + FILETIME BuildTime; + } WAVEBANKDATA, *LPWAVEBANKDATA; + typedef const WAVEBANKDATA *LPCWAVEBANKDATA; +-- +2.27.0 + diff --git a/staging/upstream-commit b/staging/upstream-commit index 83f6069b..2e2694bd 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -22970932d014f024fcf7f0f98b1a5384b1b1eb99 +948a6a47b8dbd0ddd86cad04de03f0e4ba81b65d