Compare commits

...

35 Commits
v8.3 ... v8.7

Author SHA1 Message Date
Alistair Leslie-Hughes
00ec1171cc Release v8.7 2023-04-29 18:38:56 +10:00
Alistair Leslie-Hughes
277ed0c6fb Rebase against 619e34500fc43f1103fddd91e86d581660d2ae4b. 2023-04-27 09:40:06 +10:00
Alistair Leslie-Hughes
0c2c469c7b Rebase against a500bb72f05058c985511ff35f191565f45cd6c0. 2023-04-26 11:01:51 +10:00
Alistair Leslie-Hughes
7f36a96808 Updated wined3d-WINED3DFMT_B8G8R8X8_UNORM patchset
Fixes: https://bugs.winehq.org/show_bug.cgi?id=54868
2023-04-20 07:28:44 +10:00
Zebediah Figura
566a2bcdfd Rebase against 9e99c6f66d236101a084b6a3a24c98b5c8677fe5. 2023-04-18 17:32:53 -05:00
Zebediah Figura
4eb322dc41 riched20-IText_Interface: Remove patch 0010 silencing FIXMEs.
If this is desired, it can be easily rewritten and submitted upstream.
2023-04-16 16:19:00 -05:00
Zebediah Figura
182d6c76e3 wined3d-Silence_FIXMEs: Remove patch set.
This would be desirable if we had a known application that needed it, but we don't. If the application ever resurfaces, it will be easy to rewrite and fix upstream.
2023-04-16 16:17:30 -05:00
Zebediah Figura
3e931ce80f ddraw-Silence_FIXMEs: Remove patch set.
This would be desirable if we had a known application that needed it, but we don't. If the application ever resurfaces, it will be easy to rewrite and fix upstream.
2023-04-16 16:17:14 -05:00
Zebediah Figura
716e192182 Release v8.6.1 2023-04-16 12:59:31 -05:00
Zebediah Figura
fba1e773c7 mfplat-streaming-support: Fix rebase. 2023-04-16 12:59:09 -05:00
Zebediah Figura
26a1ee0ee9 Release v8.6 2023-04-15 22:16:28 -05:00
Zebediah Figura
9d65092519 Rebase against 4d610717bbc21d65e41a29f9fe9ab5f2963cf16d. 2023-04-15 18:33:17 -05:00
Zebediah Figura
49dcc78363 Rebase against f512b3c08ccfc9b9c235964002e644e2cbd657cf. 2023-04-12 17:10:01 -05:00
Alistair Leslie-Hughes
64774ec3e5 Rebase against 1546ef3015999ee27066b317773050a5641c2023. 2023-04-12 08:17:52 +10:00
Alistair Leslie-Hughes
4211bac798 Rebase against 9909631f23c037e90fe3ef1ccfeebfff2804d7ed. 2023-04-08 14:18:34 +10:00
Alistair Leslie-Hughes
aaa21bda9c Rebase against e658a30a917b0403a1e8f7ed86a8fc0138d990a8. 2023-04-07 08:28:31 +10:00
Alistair Leslie-Hughes
9d5115a9ee Rebase against b5bc026798c127d5bb4c471d94f7fb5e32b4861c. 2023-04-06 09:14:54 +10:00
Alistair Leslie-Hughes
9cb0330037 Rebase against 64cca153292833151d1adeb185252ca57e2d1625. 2023-04-04 10:40:07 +10:00
Alistair Leslie-Hughes
abe75a7741 Release v8.5 2023-04-01 15:19:47 +11:00
Alistair Leslie-Hughes
be92c5d768 Added ntdll-hidden_file_attr patchset 2023-04-01 11:07:21 +11:00
Alistair Leslie-Hughes
6d45ccd523 Added win32u-GPU_properties patchset 2023-04-01 10:27:27 +11:00
Alistair Leslie-Hughes
6dbab0f2e5 Updated mfplat-streaming-support patchset
Fixes a crash on some videos.
2023-03-29 20:24:12 +11:00
Alistair Leslie-Hughes
e0766792bd Rebase against da0ec7fbbde45126320e15b2bfb00b357b45ffb6. 2023-03-29 13:53:46 +11:00
Alistair Leslie-Hughes
df3886edb6 Rebase against d62e2268d77c237e8430e158bb337958d88486ba. 2023-03-28 18:40:22 +11:00
Alistair Leslie-Hughes
7bcf1f6358 Rebase against 3149d27220acaf276bfa651e040ff006edcd6944. 2023-03-24 09:51:18 +11:00
Zebediah Figura
cd4d265f07 Revert "patchinstall.py: Use --git-dir instead of -C."
This reverts commit cf29ed121d.

This doesn't quite do what I thought it did, and breaks the intended setup.
2023-03-21 00:42:48 -05:00
Zebediah Figura
cf29ed121d patchinstall.py: Use --git-dir instead of -C.
This reportedly works better for nested git trees.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51877
2023-03-20 17:51:52 -05:00
Zebediah Figura
09634de79c dinput-joy-mappings: Restore tests to patch 1.
The patch set is disabled now. We want to make sure that these tests are ported when it's rewritten.
2023-03-20 17:32:58 -05:00
Zebediah Figura
68cc39d3ba Rebase against fd99bd4e247a879e8cb186212d1dc66268aa0888. 2023-03-20 17:32:04 -05:00
Alistair Leslie-Hughes
3a47cfd8a5 Release v8.4 2023-03-18 14:56:06 +11:00
Alistair Leslie-Hughes
fab4cd0932 Rebase against 446da60e78beb321d776b48cdee6f764c81b924b. 2023-03-17 16:05:30 +11:00
Alistair Leslie-Hughes
2ac5cdbf37 Rebase against 7db5431699037d03f26c065a58c400991210c7f7. 2023-03-15 15:06:52 +11:00
Alistair Leslie-Hughes
e3a3dcd0ce Rebase against a8fa80cfb4a1819be12ece459753bc07d4ea8be6. 2023-03-10 16:29:07 +11:00
Alistair Leslie-Hughes
aa36637563 Rebase against 50f5f9af1c27c4380a7489596d20d8048f003365. 2023-03-08 09:45:55 +11:00
Alistair Leslie-Hughes
70958b46d0 Rebase against 45e83cc8c28cece236f1537958f6e21b48193f2c. 2023-03-07 11:24:26 +11:00
43 changed files with 851 additions and 566 deletions

View File

@@ -1,29 +0,0 @@
From ff117878cb3a0c74a50355ca64ac36c5fe6cee67 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Fri, 10 Mar 2017 22:07:37 +0100
Subject: ddraw: Silence noisy FIXME about unimplemented
D3DPROCESSVERTICES_UPDATEEXTENTS.
---
dlls/ddraw/executebuffer.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c
index 393c52c1e2..9b64c687d3 100644
--- a/dlls/ddraw/executebuffer.c
+++ b/dlls/ddraw/executebuffer.c
@@ -302,7 +302,10 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
ci->wStart, ci->wDest, ci->dwCount, ci->dwFlags);
if (ci->dwFlags & D3DPROCESSVERTICES_UPDATEEXTENTS)
- FIXME("D3DPROCESSVERTICES_UPDATEEXTENTS not implemented.\n");
+ {
+ static int once;
+ if (!once++) FIXME("D3DPROCESSVERTICES_UPDATEEXTENTS not implemented.\n");
+ }
if (ci->dwFlags & D3DPROCESSVERTICES_NOCOLOR)
FIXME("D3DPROCESSVERTICES_NOCOLOR not implemented.\n");
--
2.11.0

View File

@@ -1,73 +0,0 @@
From 98a9b8337d40c1f6df21227dff3d993f270aef46 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 24 May 2019 16:16:13 +1000
Subject: [PATCH] dinput: Allow mapping of controls based of Genre type.
---
dlls/dinput/device.c | 41 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index e826cc89c1e..a4815f24958 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -1741,8 +1741,15 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
/* Count the actions */
for (i = 0; i < format->dwNumActions; i++)
- if (IsEqualGUID( &impl->guid, &format->rgoAction[i].guidInstance ))
+ {
+ if (IsEqualGUID(&impl->guid, &format->rgoAction[i].guidInstance) ||
+ (IsEqualGUID(&IID_NULL, &format->rgoAction[i].guidInstance) &&
+ ((format->rgoAction[i].dwSemantic & format->dwGenre) == format->dwGenre ||
+ (format->rgoAction[i].dwSemantic & 0xff000000) == 0xff000000 /* Any Axis */) ))
+ {
num_actions++;
+ }
+ }
/* Should return DI_NOEFFECT if we dont have any actions and actionformat has not changed */
if (num_actions == 0 && format->dwCRC == new_crc && !(flags & DIDSAM_FORCESAVE)) return DI_NOEFFECT;
@@ -1779,7 +1786,39 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
action++;
}
+ else if ((format->rgoAction[i].dwSemantic & format->dwGenre) == format->dwGenre ||
+ (format->rgoAction[i].dwSemantic & 0xff000000) == 0xff000000 /* Any Axis */)
+ {
+ DWORD obj_id = semantic_to_obj_id(impl, format->rgoAction[i].dwSemantic);
+ DWORD type = DIDFT_GETTYPE(obj_id);
+ DWORD inst = DIDFT_GETINSTANCE(obj_id);
+ LPDIOBJECTDATAFORMAT obj;
+
+ if (type == DIDFT_PSHBUTTON) type = DIDFT_BUTTON;
+ else if (type == DIDFT_RELAXIS) type = DIDFT_AXIS;
+
+ obj = dataformat_to_odf_by_type(df, inst, type);
+ TRACE("obj %p, inst 0x%08lx, type 0x%08lx\n", obj, inst, type);
+ if(obj)
+ {
+ memcpy(&obj_df[action], obj, df->dwObjSize);
+
+ impl->action_map[action].uAppData = format->rgoAction[i].uAppData;
+ impl->action_map[action].offset = offset;
+ obj_df[action].dwOfs = offset;
+ offset += (type & DIDFT_BUTTON) ? 1 : 4;
+
+ action++;
+ }
+ }
+ }
+
+ if (action == 0)
+ {
+ free( obj_df );
+ return DI_NOEFFECT;
}
+ data_format.dwNumObjs = action;
IDirectInputDevice8_SetDataFormat( iface, &data_format );
--
2.33.0

View File

@@ -1,3 +1,5 @@
Fixes: [34108] dinput: Improve support for user Joystick configuration.
Fixes: [47326] dinput: Allow mapping of controls based of genre type.
Fixes: [35815] dinput: Allow remapping of joystick buttons.
# Seeing active work...
Disabled: true

View File

@@ -1,4 +1,4 @@
From be7001f58850fb46ee07e9b4fba310c64157ee0f Mon Sep 17 00:00:00 2001
From 2a1229098b39f923ff6e9a13bde05e161c797b0a Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 9 Jul 2019 14:13:28 +1000
Subject: [PATCH] user32: Do not enumerate the registry in
@@ -13,10 +13,10 @@ not the complete list from the registry.
3 files changed, 36 insertions(+), 33 deletions(-)
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 2f4dc06f6ce..7345b78eaeb 100644
index 8f3cd8acae7..072f1fab23a 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -494,7 +494,6 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout )
@@ -499,7 +499,6 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout )
return FALSE;
}
@@ -25,10 +25,10 @@ index 2f4dc06f6ce..7345b78eaeb 100644
{
SendMessageTimeoutW(handle, WM_DEVICECHANGE, flags, (LPARAM)header, SMTO_ABORTIFHUNG, 2000, NULL);
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index ee39b11fc12..35670ca7538 100644
index 8f3d5750c2f..3bdfd042e85 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -4899,6 +4899,40 @@ static void test_EnableMouseInPointer( char **argv, BOOL enable )
@@ -5091,6 +5091,40 @@ static void test_EnableMouseInPointer( char **argv, BOOL enable )
CloseHandle( info.hProcess );
}
@@ -69,7 +69,7 @@ index ee39b11fc12..35670ca7538 100644
START_TEST(input)
{
char **argv;
@@ -4949,6 +4983,7 @@ START_TEST(input)
@@ -5142,6 +5176,7 @@ START_TEST(input)
test_GetRawInputBuffer();
test_RegisterRawInputDevices();
test_rawinput(argv[0]);
@@ -78,10 +78,10 @@ index ee39b11fc12..35670ca7538 100644
if(pGetMouseMovePointsEx)
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
index 36f2a45f4ef..bf4e871d107 100644
index 11bb129134c..9864d80ceff 100644
--- a/dlls/win32u/input.c
+++ b/dlls/win32u/input.c
@@ -1187,11 +1187,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
@@ -1250,11 +1250,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
*/
UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
{
@@ -94,7 +94,7 @@ index 36f2a45f4ef..bf4e871d107 100644
HKL layout;
TRACE_(keyboard)( "size %d, layouts %p.\n", size, layouts );
@@ -1205,33 +1201,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
@@ -1268,33 +1264,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
if (size && layouts)
{
layouts[count - 1] = layout;
@@ -111,10 +111,10 @@ index 36f2a45f4ef..bf4e871d107 100644
- tmp = wcstoul( key_info->Name, NULL, 16 );
- if (query_reg_ascii_value( subkey, "Layout Id", value_info, sizeof(buffer) ) &&
- value_info->Type == REG_SZ)
- tmp = MAKELONG( LOWORD( tmp ),
- 0xf000 | (wcstoul( (const WCHAR *)value_info->Data, NULL, 16 ) & 0xfff) );
- tmp = 0xf000 | (wcstoul( (const WCHAR *)value_info->Data, NULL, 16 ) & 0xfff);
- NtClose( subkey );
-
- tmp = MAKELONG( LOWORD( layout ), LOWORD( tmp ) );
- if (layout == UlongToHandle( tmp )) continue;
-
- count++;

View File

@@ -1,4 +1,4 @@
From eba9e414d60a33dfde7e7b978fcdddbaf9bfe5b6 Mon Sep 17 00:00:00 2001
From 612c0266b7a8cec562f82f1a2aaf55cffc15f35e Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 21 Oct 2020 16:03:21 -0500
Subject: [PATCH] winegstreamer: Allow videoconvert to parallelize.
@@ -11,19 +11,19 @@ Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
1 file changed, 3 insertions(+)
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
index 0573c99858b..5df08dc5fd7 100644
index dfb3da9a4ab..2135dea456b 100644
--- a/dlls/winegstreamer/wg_parser.c
+++ b/dlls/winegstreamer/wg_parser.c
@@ -760,6 +760,9 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
if (!(vconv = create_element("videoconvert", "base")))
goto out;
@@ -842,6 +842,9 @@ static bool stream_create_post_processing_elements(struct wg_parser_stream *stre
|| !append_element(parser->container, element, &first, &last))
return false;
+ /* Let GStreamer choose a default number of threads. */
+ gst_util_set_object_arg(G_OBJECT(vconv), "n-threads", "0");
+ gst_util_set_object_arg(G_OBJECT(element), "n-threads", "0");
+
/* GStreamer outputs RGB video top-down, but DirectShow expects bottom-up. */
if (!(flip = create_element("videoflip", "good")))
goto out;
if (!(element = create_element("videoflip", "good"))
|| !append_element(parser->container, element, &first, &last))
--
2.37.2
2.39.2

View File

@@ -1,18 +1,18 @@
From e1c18d8fda84e300fc6ae2b90bf3770c4f2bb2c7 Mon Sep 17 00:00:00 2001
From ca64589b2447f378651f19eb15672f27c2133493 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Fri, 19 Mar 2021 17:01:54 -0400
Subject: [PATCH] winegstreamer: Report streams backwards in media source.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/winegstreamer/media_source.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
dlls/winegstreamer/media_source.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
index 542189b28f5..a9e97f545dd 100644
index 1b57d8bfba8..4d2a29a6bc1 100644
--- a/dlls/winegstreamer/media_source.c
+++ b/dlls/winegstreamer/media_source.c
@@ -1496,7 +1496,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
@@ -1497,7 +1497,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
DWORD len;
char *str;
@@ -21,6 +21,15 @@ index 542189b28f5..a9e97f545dd 100644
for (j = 0; j < ARRAY_SIZE(tags); ++j)
{
@@ -1510,7 +1510,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
}
strW = malloc(len * sizeof(*strW));
if (MultiByteToWideChar(CP_UTF8, 0, str, -1, strW, len))
- IMFStreamDescriptor_SetString(descriptors[i], tags[j].mf_attr, strW);
+ IMFStreamDescriptor_SetString(descriptors[object->stream_count - 1 - i], tags[j].mf_attr, strW);
free(strW);
free(str);
}
--
2.38.1
2.40.0

View File

@@ -1,4 +1,4 @@
From 56ad22a46d27fdc5313aff459f6334bb0051e21a Mon Sep 17 00:00:00 2001
From af54761b8536f81831f2813ef0ff9b627dcc5ca4 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov@codeweavers.com>
Date: Wed, 12 Jan 2022 22:48:35 +0300
Subject: [PATCH] winegstreamer: Add MFVideoFormat_ARGB32 output for the
@@ -12,10 +12,10 @@ CW-Bug-Id: #19975
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
index de6a2c2b232..042c635ae93 100644
index 00c40dc2f47..7a0f65b4247 100644
--- a/dlls/winegstreamer/media_source.c
+++ b/dlls/winegstreamer/media_source.c
@@ -855,7 +855,7 @@ static HRESULT new_media_stream(struct media_source *source,
@@ -856,7 +856,7 @@ static HRESULT new_media_stream(struct media_source *source,
static HRESULT media_stream_init_desc(struct media_stream *stream)
{
IMFMediaTypeHandler *type_handler = NULL;
@@ -24,14 +24,14 @@ index de6a2c2b232..042c635ae93 100644
struct wg_format format;
DWORD type_count = 0;
unsigned int i;
@@ -874,6 +874,7 @@ static HRESULT media_stream_init_desc(struct media_stream *stream)
&MFVideoFormat_YUY2,
&MFVideoFormat_IYUV,
&MFVideoFormat_I420,
+ &MFVideoFormat_ARGB32,
@@ -875,6 +875,7 @@ static HRESULT media_stream_init_desc(struct media_stream *stream)
WG_VIDEO_FORMAT_YV12,
WG_VIDEO_FORMAT_YUY2,
WG_VIDEO_FORMAT_I420,
+ WG_VIDEO_FORMAT_BGRA,
};
IMFMediaType *base_type = mf_media_type_from_wg_format(&format);
--
2.37.2
2.40.0

View File

@@ -1,4 +1,4 @@
From 0dfebc8cb8ed9804c6616fe7eec519b7c3e7ea13 Mon Sep 17 00:00:00 2001
From 3c2f30734ab4ab7a602f1f66d415a245063ee6d8 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 16 Jan 2014 20:56:49 -0700
Subject: [PATCH] ntdll: Add support for creating reparse points.
@@ -13,10 +13,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
5 files changed, 447 insertions(+), 19 deletions(-)
diff --git a/configure.ac b/configure.ac
index 16c4c33d816..e492a707a48 100644
index c4f34e9e851..ec76805b3e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2061,6 +2061,8 @@ AC_CHECK_FUNCS(\
@@ -2025,6 +2025,8 @@ AC_CHECK_FUNCS(\
prctl \
proc_pidinfo \
sched_yield \
@@ -26,12 +26,12 @@ index 16c4c33d816..e492a707a48 100644
setprogname \
sigprocmask \
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
index 89e4d5bb579..07688a5fcf6 100644
index 2e862c68b7e..f8ca3e689ec 100644
--- a/dlls/ntdll/Makefile.in
+++ b/dlls/ntdll/Makefile.in
@@ -4,7 +4,7 @@ UNIXLIB = ntdll.so
IMPORTLIB = ntdll
IMPORTS = winecrt0
IMPORTS = $(MUSL_PE_LIBS) winecrt0
UNIX_CFLAGS = $(UNWIND_CFLAGS)
-UNIX_LIBS = $(IOKIT_LIBS) $(COREFOUNDATION_LIBS) $(CORESERVICES_LIBS) $(RT_LIBS) $(PTHREAD_LIBS) $(UNWIND_LIBS) $(I386_LIBS) $(PROCSTAT_LIBS)
+UNIX_LIBS = $(IOKIT_LIBS) $(COREFOUNDATION_LIBS) $(CORESERVICES_LIBS) $(RT_LIBS) $(PTHREAD_LIBS) $(UNWIND_LIBS) $(I386_LIBS) $(PROCSTAT_LIBS) -lm
@@ -39,7 +39,7 @@ index 89e4d5bb579..07688a5fcf6 100644
EXTRADLLFLAGS = -nodefaultlibs
i386_EXTRADLLFLAGS = -Wl,--image-base,0x7bc00000
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 98d9e6b3b0a..93e50bd6952 100644
index 6186afdfb63..7f753caef47 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -38,6 +38,7 @@
@@ -50,7 +50,7 @@ index 98d9e6b3b0a..93e50bd6952 100644
#ifndef IO_COMPLETION_ALL_ACCESS
#define IO_COMPLETION_ALL_ACCESS 0x001F0003
@@ -5326,32 +5327,154 @@ static void test_mailslot_name(void)
@@ -5406,32 +5407,154 @@ static void test_mailslot_name(void)
CloseHandle( device );
}
@@ -101,7 +101,9 @@ index 98d9e6b3b0a..93e50bd6952 100644
+ INT buffer_len;
+ HANDLE handle;
+ BOOL bret;
+
- pRtlInitUnicodeString( &nameW, L"\\??\\C:\\" );
- InitializeObjectAttributes( &attr, &nameW, 0, NULL, NULL );
+ /* Create a temporary folder for the junction point tests */
+ GetTempFileNameW(dotW, fooW, 0, path);
+ DeleteFileW(path);
@@ -110,7 +112,9 @@ index 98d9e6b3b0a..93e50bd6952 100644
+ win_skip("Unable to create a temporary junction point directory.\n");
+ return;
+ }
+
- status = pNtOpenFile( &handle, READ_CONTROL, &attr, &io, 0, 0 );
- ok( !status, "open %s failed %#lx\n", wine_dbgstr_w(nameW.Buffer), status );
+ /* Check that the volume this folder is located on supports junction points */
+ pRtlDosPathNameToNtPathName_U(path, &nameW, NULL, NULL);
+ volW[0] = nameW.Buffer[4];
@@ -127,15 +131,17 @@ index 98d9e6b3b0a..93e50bd6952 100644
+ RemoveDirectoryW(path);
+ return;
+ }
+
- status = pNtFsControlFile( handle, NULL, NULL, NULL, &io, FSCTL_GET_REPARSE_POINT, NULL, 0, NULL, 0 );
- ok( status == STATUS_INVALID_USER_BUFFER, "expected %#lx, got %#lx\n", STATUS_INVALID_USER_BUFFER, status );
+ /* Create the folder to be replaced by a junction point */
+ lstrcpyW(reparse_path, path);
+ lstrcatW(reparse_path, reparseW);
+ bret = CreateDirectoryW(reparse_path, NULL);
+ ok(bret, "Failed to create junction point directory.\n");
- pRtlInitUnicodeString( &nameW, L"\\??\\C:\\" );
- InitializeObjectAttributes( &attr, &nameW, 0, NULL, NULL );
- status = pNtFsControlFile( handle, NULL, NULL, NULL, &io, FSCTL_GET_REPARSE_POINT, NULL, 0, reparse_data, 0 );
- ok( status == STATUS_INVALID_USER_BUFFER, "expected %#lx, got %#lx\n", STATUS_INVALID_USER_BUFFER, status );
+ /* Create a destination folder for the junction point to target */
+ lstrcpyW(target_path, path);
+ for (int i=0; i<1; i++)
@@ -148,8 +154,9 @@ index 98d9e6b3b0a..93e50bd6952 100644
+ ok(bret, "Failed to create junction point target directory.\n");
+ pRtlDosPathNameToNtPathName_U(path, &nameW, NULL, NULL);
- status = pNtOpenFile( &handle, READ_CONTROL, &attr, &io, 0, 0 );
- ok( !status, "open %s failed %#lx\n", wine_dbgstr_w(nameW.Buffer), status );
- /* a volume cannot be a reparse point by definition */
- status = pNtFsControlFile( handle, NULL, NULL, NULL, &io, FSCTL_GET_REPARSE_POINT, NULL, 0, reparse_data, 1 );
- ok( status == STATUS_NOT_A_REPARSE_POINT, "expected %#lx, got %#lx\n", STATUS_NOT_A_REPARSE_POINT, status );
+ /* construct a too long pathname (resulting reparse buffer over 16 kiB limit) */
+ long_path = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 32767);
+ lstrcpyW(long_path, nameW.Buffer);
@@ -159,7 +166,8 @@ index 98d9e6b3b0a..93e50bd6952 100644
+ lstrcatW(long_path, path);
+ }
+ lstrcatW(long_path, targetW);
+
- CloseHandle( handle );
+ /* Create the junction point */
+ handle = CreateFileW(reparse_path, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0);
@@ -173,9 +181,7 @@ index 98d9e6b3b0a..93e50bd6952 100644
+ ok(!bret && GetLastError()==ERROR_INVALID_REPARSE_DATA, "Unexpected error (0x%lx)\n", GetLastError());
+ HeapFree(GetProcessHeap(), 0, buffer);
+ CloseHandle(handle);
- status = pNtFsControlFile( handle, NULL, NULL, NULL, &io, FSCTL_GET_REPARSE_POINT, NULL, 0, NULL, 0 );
- ok( status == STATUS_INVALID_USER_BUFFER, "expected %#lx, got %#lx\n", STATUS_INVALID_USER_BUFFER, status );
+
+ /* construct a long pathname to demonstrate correct behavior with very large reparse points */
+ pRtlDosPathNameToNtPathName_U(path, &nameW, NULL, NULL);
+ lstrcpyW(long_path, nameW.Buffer);
@@ -185,16 +191,11 @@ index 98d9e6b3b0a..93e50bd6952 100644
+ lstrcatW(long_path, path);
+ }
+ lstrcatW(long_path, targetW);
- status = pNtFsControlFile( handle, NULL, NULL, NULL, &io, FSCTL_GET_REPARSE_POINT, NULL, 0, reparse_data, 0 );
- ok( status == STATUS_INVALID_USER_BUFFER, "expected %#lx, got %#lx\n", STATUS_INVALID_USER_BUFFER, status );
+
+ /* use a sane (not obscenely long) target for the rest of testing */
+ pRtlFreeUnicodeString(&nameW);
+ pRtlDosPathNameToNtPathName_U(target_path, &nameW, NULL, NULL);
- /* a volume cannot be a reparse point by definition */
- status = pNtFsControlFile( handle, NULL, NULL, NULL, &io, FSCTL_GET_REPARSE_POINT, NULL, 0, reparse_data, 1 );
- ok( status == STATUS_NOT_A_REPARSE_POINT, "expected %#lx, got %#lx\n", STATUS_NOT_A_REPARSE_POINT, status );
+
+ /* Create the junction point */
+ handle = CreateFileW(reparse_path, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0);
@@ -207,8 +208,7 @@ index 98d9e6b3b0a..93e50bd6952 100644
+ bret = DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
+ ok(bret, "Failed to create junction point! (0x%lx)\n", GetLastError());
+ CloseHandle(handle);
- CloseHandle( handle );
+
+cleanup:
+ /* Cleanup */
+ pRtlFreeUnicodeString(&nameW);
@@ -222,7 +222,7 @@ index 98d9e6b3b0a..93e50bd6952 100644
}
START_TEST(file)
@@ -5426,6 +5549,6 @@ START_TEST(file)
@@ -5506,6 +5629,6 @@ START_TEST(file)
test_ioctl();
test_query_ea();
test_flush_buffers_file();
@@ -231,7 +231,7 @@ index 98d9e6b3b0a..93e50bd6952 100644
+ test_mailslot_name();
}
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 6b73d9dc7e8..52b85cfc6d1 100644
index eca75b2d4fb..0cef6438c7e 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -36,6 +36,8 @@
@@ -243,7 +243,7 @@ index 6b73d9dc7e8..52b85cfc6d1 100644
#include <limits.h>
#include <unistd.h>
#ifdef HAVE_MNTENT_H
@@ -121,6 +123,7 @@
@@ -125,6 +127,7 @@
#include "wine/list.h"
#include "wine/debug.h"
#include "unix_private.h"
@@ -251,7 +251,7 @@ index 6b73d9dc7e8..52b85cfc6d1 100644
WINE_DEFAULT_DEBUG_CHANNEL(file);
WINE_DECLARE_DEBUG_CHANNEL(winediag);
@@ -132,6 +135,12 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
@@ -136,6 +139,12 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
#undef EXT2_IOC_GETFLAGS
#undef EXT4_CASEFOLD_FL
@@ -264,7 +264,7 @@ index 6b73d9dc7e8..52b85cfc6d1 100644
#ifdef linux
/* We want the real kernel dirent structure, not the libc one */
@@ -236,6 +245,95 @@ static const BOOL is_case_sensitive = FALSE;
@@ -247,6 +256,95 @@ static const BOOL is_case_sensitive = FALSE;
static pthread_mutex_t dir_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t mnt_mutex = PTHREAD_MUTEX_INITIALIZER;
@@ -360,7 +360,7 @@ index 6b73d9dc7e8..52b85cfc6d1 100644
/* check if a given Unicode char is OK in a DOS short name */
static inline BOOL is_invalid_dos_char( WCHAR ch )
{
@@ -1540,6 +1638,28 @@ static int parse_samba_dos_attrib_data( char *data, int len )
@@ -1562,6 +1660,28 @@ static int parse_samba_dos_attrib_data( char *data, int len )
}
@@ -389,7 +389,7 @@ index 6b73d9dc7e8..52b85cfc6d1 100644
static BOOL fd_is_mount_point( int fd, const struct stat *st )
{
struct stat parent;
@@ -3313,6 +3433,181 @@ done:
@@ -3335,6 +3455,181 @@ done:
}
@@ -571,7 +571,7 @@ index 6b73d9dc7e8..52b85cfc6d1 100644
/******************************************************************************
* lookup_unix_name
*
@@ -6072,6 +6367,13 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
@@ -6099,6 +6394,13 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
break;
}
@@ -586,10 +586,10 @@ index 6b73d9dc7e8..52b85cfc6d1 100644
TRACE("FSCTL_SET_SPARSE: Ignoring request\n");
io->Information = 0;
diff --git a/include/Makefile.in b/include/Makefile.in
index 28ac4b3f2dc..7c69ddbfddf 100644
index f52314e745d..2ec4d835743 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -564,6 +564,7 @@ SOURCES = \
@@ -572,6 +572,7 @@ SOURCES = \
ntdef.h \
ntdsapi.h \
ntgdi.h \
@@ -598,5 +598,5 @@ index 28ac4b3f2dc..7c69ddbfddf 100644
ntquery.h \
ntsecapi.h \
--
2.38.1
2.39.2

View File

@@ -1,23 +1,22 @@
From c97697f6bbc3c9671210e480f2fcfe761b54893d Mon Sep 17 00:00:00 2001
From 6a2f524736ad25b89af90a74eedfa2f2b0f178e6 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Fri, 11 Nov 2022 18:30:20 -0600
Subject: [PATCH] ntdll: Fully support unaligned views in free ranges
management.
---
dlls/ntdll/unix/virtual.c | 41 ++++++++++++++++++++-------------------
1 file changed, 21 insertions(+), 20 deletions(-)
dlls/ntdll/unix/virtual.c | 40 ++++++++++++++++++++-------------------
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 4cb0f349ffc..2dca5dfa45f 100644
index 847cfd750f3..cfa69d8d7f5 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -749,18 +749,19 @@ static void free_ranges_insert_view( struct file_view *view )
@@ -742,17 +742,19 @@ static void free_ranges_insert_view( struct file_view *view )
assert( range != free_ranges_end );
assert( range->end > view_base || next != free_ranges_end );
- /* this happens because virtual_alloc_thread_stack shrinks a view, then creates another one on top,
- * or because AT_ROUND_TO_PAGE was used with NtMapViewOfSection to force 4kB aligned mapping. */
- /* this happens because AT_ROUND_TO_PAGE was used with NtMapViewOfSection to force 4kB aligned mapping. */
- if ((range->end > view_base && range->base >= view_end) ||
- (range->end == view_base && next->base >= view_end))
- {
@@ -43,7 +42,7 @@ index 4cb0f349ffc..2dca5dfa45f 100644
/* this should never happen */
if (range->base > view_base || range->end < view_end)
@@ -810,9 +811,7 @@ static void free_ranges_remove_view( struct file_view *view )
@@ -802,9 +804,7 @@ static void free_ranges_remove_view( struct file_view *view )
struct range_entry *range = free_ranges_lower_bound( view_base );
struct range_entry *next = range + 1;
@@ -54,7 +53,7 @@ index 4cb0f349ffc..2dca5dfa45f 100644
struct file_view *prev_view = RB_ENTRY_VALUE( rb_prev( &view->entry ), struct file_view, entry );
struct file_view *next_view = RB_ENTRY_VALUE( rb_next( &view->entry ), struct file_view, entry );
void *prev_view_base = prev_view ? ROUND_ADDR( prev_view->base, granularity_mask ) : NULL;
@@ -820,13 +819,15 @@ static void free_ranges_remove_view( struct file_view *view )
@@ -812,13 +812,15 @@ static void free_ranges_remove_view( struct file_view *view )
void *next_view_base = next_view ? ROUND_ADDR( next_view->base, granularity_mask ) : NULL;
void *next_view_end = next_view ? ROUND_ADDR( (char *)next_view->base + next_view->size + granularity_mask, granularity_mask ) : NULL;
@@ -77,5 +76,5 @@ index 4cb0f349ffc..2dca5dfa45f 100644
/* free_ranges initial value is such that the view is either inside range or before another one. */
assert( range != free_ranges_end );
--
2.38.1
2.40.1

View File

@@ -1,4 +1,4 @@
From 0a8dca419f3f5eacab2e9e11903cfc4c0a58dc93 Mon Sep 17 00:00:00 2001
From 326a1a51a7fa3869a13522cf52a7b4c575aebc81 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Thu, 10 Nov 2022 18:48:14 -0600
Subject: [PATCH] ntdll: Pass allocation type to map_view().
@@ -9,10 +9,10 @@ Based on a patch by Nikolay Sivov.
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 85c4ab878b3..eb1d186e11c 100644
index 55d453c2504..69c8977250a 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -2007,8 +2007,9 @@ static NTSTATUS map_fixed_area( void *base, size_t size, unsigned int vprot )
@@ -1990,8 +1990,9 @@ static NTSTATUS map_fixed_area( void *base, size_t size, unsigned int vprot )
* virtual_mutex must be held by caller.
*/
static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
@@ -23,7 +23,7 @@ index 85c4ab878b3..eb1d186e11c 100644
void *ptr;
NTSTATUS status;
@@ -2223,7 +2224,7 @@ static NTSTATUS allocate_dos_memory( struct file_view **view, unsigned int vprot
@@ -2208,7 +2209,7 @@ static NTSTATUS allocate_dos_memory( struct file_view **view, unsigned int vprot
if (mmap_is_in_reserved_area( low_64k, dosmem_size - 0x10000 ) != 1)
{
addr = anon_mmap_tryfixed( low_64k, dosmem_size - 0x10000, unix_prot, 0 );
@@ -32,15 +32,15 @@ index 85c4ab878b3..eb1d186e11c 100644
}
/* now try to allocate the low 64K too */
@@ -3236,7 +3237,7 @@ NTSTATUS virtual_alloc_thread_stack( INITIAL_TEB *stack, ULONG_PTR zero_bits, SI
@@ -3220,7 +3221,7 @@ NTSTATUS virtual_alloc_thread_stack( INITIAL_TEB *stack, ULONG_PTR zero_bits, SI
server_enter_uninterrupted_section( &virtual_mutex, &sigset );
- if ((status = map_view( &view, NULL, size + extra_size, FALSE,
+ if ((status = map_view( &view, NULL, size + extra_size, 0,
VPROT_READ | VPROT_WRITE | VPROT_COMMITTED, get_zero_bits_mask( zero_bits ), 0 ))
!= STATUS_SUCCESS)
- if ((status = map_view( &view, NULL, size, FALSE, VPROT_READ | VPROT_WRITE | VPROT_COMMITTED,
+ if ((status = map_view( &view, NULL, size, 0, VPROT_READ | VPROT_WRITE | VPROT_COMMITTED,
get_zero_bits_mask( zero_bits ), 0 )) != STATUS_SUCCESS)
goto done;
--
2.38.1
2.40.1

View File

@@ -1,4 +1,4 @@
From 94bf6ec892be0a018d4529456c47df34efdb99ce Mon Sep 17 00:00:00 2001
From 6fbb8f079b1024d742f2cc34425e6099e23f2f39 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Thu, 10 Nov 2022 18:53:10 -0600
Subject: [PATCH] ntdll: Support MEM_RESERVE_PLACEHOLDER in
@@ -10,10 +10,10 @@ Based on a patch by Nikolay Sivov.
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 66256a4712f..5bea8ba8322 100644
index f078e114b4c..6204ed5a452 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -3918,13 +3918,18 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
@@ -3891,13 +3891,18 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
/* Compute the alloc type flags */
@@ -34,7 +34,7 @@ index 66256a4712f..5bea8ba8322 100644
/* Reserve the memory */
server_enter_uninterrupted_section( &virtual_mutex, &sigset );
@@ -3935,6 +3940,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
@@ -3908,6 +3913,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
{
if (type & MEM_COMMIT) vprot |= VPROT_COMMITTED;
if (type & MEM_WRITE_WATCH) vprot |= VPROT_WRITEWATCH;
@@ -42,7 +42,7 @@ index 66256a4712f..5bea8ba8322 100644
if (protect & PAGE_NOCACHE) vprot |= SEC_NOCACHE;
if (vprot & VPROT_WRITECOPY) status = STATUS_INVALID_PAGE_PROTECTION;
@@ -3954,6 +3960,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
@@ -3927,6 +3933,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
{
if (!(view = find_view( base, size ))) status = STATUS_NOT_MAPPED_VIEW;
else if (view->protect & SEC_FILE) status = STATUS_ALREADY_COMMITTED;
@@ -50,7 +50,7 @@ index 66256a4712f..5bea8ba8322 100644
else if (!(status = set_protection( view, base, size, protect )) && (view->protect & SEC_RESERVE))
{
SERVER_START_REQ( add_mapping_committed_range )
@@ -3987,6 +3994,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
@@ -3960,6 +3967,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG_PTR zero_bits,
SIZE_T *size_ptr, ULONG type, ULONG protect )
{
@@ -58,8 +58,8 @@ index 66256a4712f..5bea8ba8322 100644
ULONG_PTR limit;
TRACE("%p %p %08lx %x %08x\n", process, *ret, *size_ptr, (int)type, (int)protect );
@@ -3998,6 +4006,12 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG_PTR z
if (!is_wow64 && zero_bits >= 32) return STATUS_INVALID_PARAMETER_3;
@@ -3971,6 +3979,12 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG_PTR z
if (!is_old_wow64() && zero_bits >= 32) return STATUS_INVALID_PARAMETER_3;
#endif
+ if (type & ~type_mask)
@@ -71,7 +71,7 @@ index 66256a4712f..5bea8ba8322 100644
if (process != NtCurrentProcess())
{
apc_call_t call;
@@ -4040,6 +4054,8 @@ NTSTATUS WINAPI NtAllocateVirtualMemoryEx( HANDLE process, PVOID *ret, SIZE_T *s
@@ -4013,6 +4027,8 @@ NTSTATUS WINAPI NtAllocateVirtualMemoryEx( HANDLE process, PVOID *ret, SIZE_T *s
ULONG protect, MEM_EXTENDED_PARAMETER *parameters,
ULONG count )
{
@@ -80,7 +80,7 @@ index 66256a4712f..5bea8ba8322 100644
ULONG_PTR limit = 0;
ULONG_PTR align = 0;
@@ -4048,6 +4064,12 @@ NTSTATUS WINAPI NtAllocateVirtualMemoryEx( HANDLE process, PVOID *ret, SIZE_T *s
@@ -4021,6 +4037,12 @@ NTSTATUS WINAPI NtAllocateVirtualMemoryEx( HANDLE process, PVOID *ret, SIZE_T *s
if (count && !parameters) return STATUS_INVALID_PARAMETER;
@@ -94,5 +94,5 @@ index 66256a4712f..5bea8ba8322 100644
{
MEM_ADDRESS_REQUIREMENTS *r = NULL;
--
2.38.1
2.40.0

View File

@@ -1,4 +1,4 @@
From 3c8ddcd9f29524479004800c91a39ec04456bd08 Mon Sep 17 00:00:00 2001
From b7ce843ce7c536b452aee408ab127a8300412909 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 00:50:50 +0100
Subject: [PATCH] ntdll/tests: Add basic tests for RtlQueryPackageIdentity.
@@ -20,7 +20,7 @@ index 90deb5865f8..428ebde23b3 100644
C_SRCS = \
atom.c \
diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c
index a7c43a46e07..9088d222b47 100644
index 3a5564fc6b8..5408fc4b7da 100644
--- a/dlls/ntdll/tests/rtl.c
+++ b/dlls/ntdll/tests/rtl.c
@@ -28,6 +28,9 @@
@@ -53,7 +53,7 @@ index a7c43a46e07..9088d222b47 100644
pLdrRegisterDllNotification = (void *)GetProcAddress(hntdll, "LdrRegisterDllNotification");
pLdrUnregisterDllNotification = (void *)GetProcAddress(hntdll, "LdrUnregisterDllNotification");
}
@@ -3788,6 +3797,76 @@ static void test_RtlFirstFreeAce(void)
@@ -3608,6 +3617,76 @@ static void test_RtlFirstFreeAce(void)
HeapFree(GetProcessHeap(), 0, acl);
}
@@ -127,10 +127,10 @@ index a7c43a46e07..9088d222b47 100644
+ CoUninitialize();
+}
+
static void test_TlsIndex(void)
START_TEST(rtl)
{
LIST_ENTRY *root = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
@@ -3852,6 +3931,7 @@ START_TEST(rtl)
InitFunctionPtrs();
@@ -3647,6 +3726,7 @@ START_TEST(rtl)
test_RtlInitializeCriticalSectionEx();
test_RtlLeaveCriticalSection();
test_LdrEnumerateLoadedModules();
@@ -139,5 +139,5 @@ index a7c43a46e07..9088d222b47 100644
test_LdrRegisterDllNotification();
test_DbgPrint();
--
2.39.0
2.39.2

View File

@@ -1,4 +1,4 @@
From a53a38937f258294b4c98b3de57f8734158f5b6b Mon Sep 17 00:00:00 2001
From a20d7bb78dc0d2d134cfe6461c117fea1a5753ed Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Tue, 14 Jul 2020 15:00:34 +0300
Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
@@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
2 files changed, 186 insertions(+)
diff --git a/configure.ac b/configure.ac
index db7753959d7..08dd970506e 100644
index a8c1d1522fe..2fd9f7a497d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -445,6 +445,7 @@ AC_CHECK_HEADERS(\
@@ -427,6 +427,7 @@ AC_CHECK_HEADERS(\
linux/ioctl.h \
linux/major.h \
linux/param.h \
@@ -21,7 +21,7 @@ index db7753959d7..08dd970506e 100644
linux/types.h \
linux/ucdrom.h \
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index c726b962074..ae985625e50 100644
index bf528226462..a5cd26b7ea0 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -27,6 +27,7 @@
@@ -53,10 +53,10 @@ index c726b962074..ae985625e50 100644
+# include <linux/audit.h>
+#endif
+
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "ntstatus.h"
@@ -1807,6 +1818,179 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
#define WIN32_NO_STATUS
#include "windef.h"
@@ -1821,6 +1832,179 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
return 0;
}
@@ -236,7 +236,7 @@ index c726b962074..ae985625e50 100644
/***********************************************************************
* handle_interrupt
@@ -2479,6 +2663,7 @@ void signal_init_process(void)
@@ -2520,6 +2704,7 @@ void signal_init_process(void)
if (sigaction( SIGSEGV, &sig_act, NULL ) == -1) goto error;
if (sigaction( SIGILL, &sig_act, NULL ) == -1) goto error;
if (sigaction( SIGBUS, &sig_act, NULL ) == -1) goto error;
@@ -245,5 +245,5 @@ index c726b962074..ae985625e50 100644
error:
--
2.38.1
2.40.1

View File

@@ -0,0 +1,123 @@
From cd0e7d0bd693a35fde5a83f76af16cd04b17c5e3 Mon Sep 17 00:00:00 2001
From: Torge Matthies <tmatthies@codeweavers.com>
Date: Thu, 30 Mar 2023 05:46:38 +0200
Subject: [PATCH 1/6] ntdll/tests: Add test for file attributes of files with
names beginning with a dot.
---
dlls/ntdll/tests/file.c | 92 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 92 insertions(+)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 6186afdfb63..beaa4734931 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -4051,6 +4051,97 @@ static void test_file_attribute_tag_information(void)
CloseHandle( h );
}
+static void rename_file( HANDLE h, const WCHAR *filename )
+{
+ FILE_RENAME_INFORMATION *fri;
+ UNICODE_STRING ntpath;
+ IO_STATUS_BLOCK io;
+ NTSTATUS status;
+ BOOLEAN ret;
+ ULONG size;
+
+ ret = pRtlDosPathNameToNtPathName_U( filename, &ntpath, NULL, NULL );
+ ok( ret, "RtlDosPathNameToNtPathName_U failed\n" );
+
+ size = offsetof( FILE_RENAME_INFORMATION, FileName ) + ntpath.Length;
+ fri = HeapAlloc( GetProcessHeap(), 0, size );
+ ok( fri != NULL, "HeapAlloc failed\n" );
+ fri->ReplaceIfExists = TRUE;
+ fri->RootDirectory = NULL;
+ fri->FileNameLength = ntpath.Length;
+ memcpy( fri->FileName, ntpath.Buffer, ntpath.Length );
+ pRtlFreeUnicodeString( &ntpath );
+
+ status = pNtSetInformationFile( h, &io, fri, size, FileRenameInformation );
+ HeapFree( GetProcessHeap(), 0, fri );
+ ok( status == STATUS_SUCCESS, "got %#lx\n", status );
+}
+
+static void test_dotfile_file_attributes(void)
+{
+ char temppath[MAX_PATH], filename[MAX_PATH];
+ WCHAR temppathW[MAX_PATH], filenameW[MAX_PATH];
+ FILE_BASIC_INFORMATION info = {};
+ IO_STATUS_BLOCK io;
+ NTSTATUS status;
+ DWORD attrs;
+ HANDLE h;
+
+ GetTempPathA( MAX_PATH, temppath );
+ GetTempFileNameA( temppath, ".foo", 0, filename );
+ h = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, 0 );
+ ok( h != INVALID_HANDLE_VALUE, "failed to create temp file\n" );
+
+ status = nt_get_file_attrs(filename, &attrs);
+ ok( status == STATUS_SUCCESS, "got %#lx\n", status );
+ todo_wine ok( !(attrs & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", attrs );
+
+ status = pNtQueryInformationFile( h, &io, &info, sizeof(info), FileBasicInformation );
+ ok( status == STATUS_SUCCESS, "got %#lx\n", status );
+ ok( !(info.FileAttributes & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", info.FileAttributes );
+
+ info.FileAttributes = FILE_ATTRIBUTE_SYSTEM;
+ status = pNtSetInformationFile( h, &io, &info, sizeof(info), FileBasicInformation );
+ ok( status == STATUS_SUCCESS, "got %#lx\n", status );
+
+ status = nt_get_file_attrs(filename, &attrs);
+ ok( status == STATUS_SUCCESS, "got %#lx\n", status );
+ ok( attrs & FILE_ATTRIBUTE_SYSTEM, "got attributes %#lx\n", attrs );
+ todo_wine ok( !(attrs & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", attrs );
+
+ status = pNtQueryInformationFile( h, &io, &info, sizeof(info), FileBasicInformation );
+ ok( status == STATUS_SUCCESS, "got %#lx\n", status );
+ ok( info.FileAttributes & FILE_ATTRIBUTE_SYSTEM, "got attributes %#lx\n", info.FileAttributes );
+ ok( !(info.FileAttributes & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", info.FileAttributes );
+
+ CloseHandle( h );
+
+ GetTempPathW( MAX_PATH, temppathW );
+ GetTempFileNameW( temppathW, L"foo", 0, filenameW );
+ h = CreateFileW( filenameW, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, 0 );
+ ok( h != INVALID_HANDLE_VALUE, "failed to create temp file\n" );
+
+ GetTempFileNameW( temppathW, L".foo", 0, filenameW );
+ winetest_push_context("foo -> .foo");
+ rename_file( h, filenameW );
+ winetest_pop_context();
+
+ status = pNtQueryInformationFile( h, &io, &info, sizeof(info), FileBasicInformation );
+ ok( status == STATUS_SUCCESS, "got %#lx\n", status );
+ ok( !(info.FileAttributes & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", info.FileAttributes );
+
+ GetTempFileNameW( temppathW, L"foo", 0, filenameW );
+ winetest_push_context(".foo -> foo");
+ rename_file( h, filenameW );
+ winetest_pop_context();
+
+ status = pNtQueryInformationFile( h, &io, &info, sizeof(info), FileBasicInformation );
+ ok( status == STATUS_SUCCESS, "got %#lx\n", status );
+ ok( !(info.FileAttributes & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", info.FileAttributes );
+
+ CloseHandle( h );
+}
+
static void test_file_mode(void)
{
UNICODE_STRING file_name, pipe_dev_name, mountmgr_dev_name, mailslot_dev_name;
@@ -5499,6 +5590,7 @@ START_TEST(file)
test_file_id_information();
test_file_access_information();
test_file_attribute_tag_information();
+ test_dotfile_file_attributes();
test_file_mode();
test_file_readonly_access();
test_query_volume_information_file();
--
2.40.0

View File

@@ -0,0 +1,46 @@
From bf28841ea6e717ed625ccd02a025fb6153f45677 Mon Sep 17 00:00:00 2001
From: Torge Matthies <tmatthies@codeweavers.com>
Date: Thu, 30 Mar 2023 05:46:39 +0200
Subject: [PATCH 2/6] ntdll: Do not open-code hidden file handling in
get_dir_data_entry.
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
---
dlls/ntdll/unix/file.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index eca75b2d4fb..f48de4641b3 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -1303,7 +1303,7 @@ static BOOL is_hidden_file( const UNICODE_STRING *name )
end = p = name->Buffer + name->Length/sizeof(WCHAR);
while (p > name->Buffer && p[-1] == '\\') p--;
while (p > name->Buffer && p[-1] != '\\') p--;
- return (p < end && *p == '.');
+ return (p < end && p + 1 != end && p[0] == '.' && p[1] != '\\' && (p[1] != '.' || (p + 2 != end && p[2] != '\\')));
}
@@ -2224,6 +2224,7 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I
union file_directory_info *info;
struct stat st;
ULONG name_len, start, dir_size, attributes;
+ UNICODE_STRING name;
if (get_file_info( names->unix_name, &st, &attributes ) == -1)
{
@@ -2253,8 +2254,8 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I
{
if (st.st_dev != dir_data->id.dev) st.st_ino = 0; /* ignore inode if on a different device */
- if (!show_dot_files && names->long_name[0] == '.' && names->long_name[1] &&
- (names->long_name[1] != '.' || names->long_name[2]))
+ RtlInitUnicodeString( &name, names->long_name );
+ if (is_hidden_file( &name ))
attributes |= FILE_ATTRIBUTE_HIDDEN;
fill_file_info( &st, attributes, info, class );
--
2.40.0

View File

@@ -0,0 +1,91 @@
From 46d8829db7ced55d93da228e7777b9f7a6a02e7d Mon Sep 17 00:00:00 2001
From: Torge Matthies <tmatthies@codeweavers.com>
Date: Thu, 30 Mar 2023 05:46:39 +0200
Subject: [PATCH 3/6] ntdll: Handle hidden file names inside get_file_info
instead of after it.
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
---
dlls/ntdll/unix/file.c | 25 +++++++++----------------
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index f48de4641b3..59e96a88279 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -1292,17 +1292,17 @@ static BOOLEAN get_dir_case_sensitivity( const char *dir )
/***********************************************************************
* is_hidden_file
*
- * Check if the specified file should be hidden based on its name and the show dot files option.
+ * Check if the specified file should be hidden based on its unix path and the show dot files option.
*/
-static BOOL is_hidden_file( const UNICODE_STRING *name )
+static BOOL is_hidden_file( const char *name )
{
- WCHAR *p, *end;
+ const char *p, *end;
if (show_dot_files) return FALSE;
- end = p = name->Buffer + name->Length/sizeof(WCHAR);
- while (p > name->Buffer && p[-1] == '\\') p--;
- while (p > name->Buffer && p[-1] != '\\') p--;
+ end = p = name + strlen( name );
+ while (p > name && p[-1] == '/') p--;
+ while (p > name && p[-1] != '/') p--;
return (p < end && p + 1 != end && p[0] == '.' && p[1] != '\\' && (p[1] != '.' || (p + 2 != end && p[2] != '\\')));
}
@@ -1677,6 +1677,9 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
}
*attr |= get_file_attributes( st );
+ if (is_hidden_file( path ))
+ *attr |= FILE_ATTRIBUTE_HIDDEN;
+
attr_len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, attr_data, sizeof(attr_data)-1 );
if (attr_len != -1)
*attr |= parse_samba_dos_attrib_data( attr_data, attr_len );
@@ -2224,7 +2227,6 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I
union file_directory_info *info;
struct stat st;
ULONG name_len, start, dir_size, attributes;
- UNICODE_STRING name;
if (get_file_info( names->unix_name, &st, &attributes ) == -1)
{
@@ -2253,11 +2255,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 */
-
- RtlInitUnicodeString( &name, names->long_name );
- if (is_hidden_file( &name ))
- attributes |= FILE_ATTRIBUTE_HIDDEN;
-
fill_file_info( &st, attributes, info, class );
}
@@ -4219,7 +4216,6 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
info->AllocationSize = std.AllocationSize;
info->EndOfFile = std.EndOfFile;
info->FileAttributes = basic.FileAttributes;
- if (is_hidden_file( attr->ObjectName )) info->FileAttributes |= FILE_ATTRIBUTE_HIDDEN;
}
free( unix_name );
}
@@ -4250,10 +4246,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 (is_hidden_file( attr->ObjectName )) info->FileAttributes |= FILE_ATTRIBUTE_HIDDEN;
- }
free( unix_name );
}
else WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), status );
--
2.40.0

View File

@@ -0,0 +1,49 @@
From 0fa1566f7cab73de95f7d4b51b83766576a60727 Mon Sep 17 00:00:00 2001
From: Torge Matthies <tmatthies@codeweavers.com>
Date: Thu, 30 Mar 2023 05:46:39 +0200
Subject: [PATCH 4/6] ntdll: Only infer hidden attribute from file name if
xattr is not present.
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
---
dlls/ntdll/tests/file.c | 2 +-
dlls/ntdll/unix/file.c | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index beaa4734931..cdd924a7226 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -4107,7 +4107,7 @@ static void test_dotfile_file_attributes(void)
status = nt_get_file_attrs(filename, &attrs);
ok( status == STATUS_SUCCESS, "got %#lx\n", status );
ok( attrs & FILE_ATTRIBUTE_SYSTEM, "got attributes %#lx\n", attrs );
- todo_wine ok( !(attrs & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", attrs );
+ ok( !(attrs & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", attrs );
status = pNtQueryInformationFile( h, &io, &info, sizeof(info), FileBasicInformation );
ok( status == STATUS_SUCCESS, "got %#lx\n", status );
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 59e96a88279..d127e113230 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -1677,14 +1677,13 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
}
*attr |= get_file_attributes( st );
- if (is_hidden_file( path ))
- *attr |= FILE_ATTRIBUTE_HIDDEN;
-
attr_len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, attr_data, sizeof(attr_data)-1 );
if (attr_len != -1)
*attr |= parse_samba_dos_attrib_data( attr_data, attr_len );
else
{
+ if (is_hidden_file( path ))
+ *attr |= FILE_ATTRIBUTE_HIDDEN;
if (errno == ENOTSUP) return ret;
#ifdef ENODATA
if (errno == ENODATA) return ret;
--
2.40.0

View File

@@ -0,0 +1,132 @@
From 2ad3cf7addcbf191db85365c0c52aa24935dcdf5 Mon Sep 17 00:00:00 2001
From: Torge Matthies <tmatthies@codeweavers.com>
Date: Thu, 30 Mar 2023 05:46:39 +0200
Subject: [PATCH 5/6] ntdll: Set xattr in NtCreateFile if inferred and
requested attributes don't match.
And make sure it doesn't get deleted.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53826
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
---
dlls/ntdll/tests/file.c | 2 +-
dlls/ntdll/unix/file.c | 26 +++++++++++++++++++-------
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index cdd924a7226..b96b2e5b072 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -4094,7 +4094,7 @@ static void test_dotfile_file_attributes(void)
status = nt_get_file_attrs(filename, &attrs);
ok( status == STATUS_SUCCESS, "got %#lx\n", status );
- todo_wine ok( !(attrs & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", attrs );
+ ok( !(attrs & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", attrs );
status = pNtQueryInformationFile( h, &io, &info, sizeof(info), FileBasicInformation );
ok( status == STATUS_SUCCESS, "got %#lx\n", status );
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index d127e113230..5f5aa9be87c 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -1600,11 +1600,11 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON
}
-static int fd_set_dos_attrib( int fd, UINT attr )
+static int fd_set_dos_attrib( int fd, UINT attr, BOOL force_set )
{
/* we only store the HIDDEN and SYSTEM attributes */
attr &= XATTR_ATTRIBS_MASK;
- if (attr != 0)
+ if (force_set || attr != 0)
{
/* encode the attributes in Samba 3 ASCII format. Samba 4 has extended
* this format with more features, but retains compatibility with the
@@ -1618,7 +1618,7 @@ static int fd_set_dos_attrib( int fd, UINT attr )
/* set the stat info and file attributes for a file (by file descriptor) */
-static NTSTATUS fd_set_file_info( int fd, UINT attr )
+static NTSTATUS fd_set_file_info( int fd, UINT attr, BOOL force_set_xattr )
{
struct stat st;
@@ -1637,7 +1637,8 @@ static NTSTATUS fd_set_file_info( int fd, UINT attr )
}
if (fchmod( fd, st.st_mode ) == -1) return errno_to_status( errno );
- if (fd_set_dos_attrib( fd, attr ) == -1 && errno != ENOTSUP)
+ force_set_xattr = force_set_xattr || st.st_nlink > 1;
+ if (fd_set_dos_attrib( fd, attr, force_set_xattr ) == -1 && errno != ENOTSUP)
WARN( "Failed to set extended attribute " SAMBA_XATTR_DOS_ATTRIB ". errno %d (%s)\n",
errno, strerror( errno ) );
@@ -3963,6 +3964,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
OBJECT_ATTRIBUTES new_attr;
UNICODE_STRING nt_name;
char *unix_name;
+ BOOL name_hidden = FALSE;
BOOL created = FALSE;
unsigned int status;
@@ -4005,6 +4007,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
if (status == STATUS_SUCCESS)
{
+ name_hidden = is_hidden_file( unix_name );
status = open_unix_file( handle, unix_name, access, &new_attr, attributes,
sharing, disposition, options, ea_buffer, ea_length );
free( unix_name );
@@ -4032,14 +4035,15 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
break;
}
- if (io->Information == FILE_CREATED && (attributes & XATTR_ATTRIBS_MASK))
+ if (io->Information == FILE_CREATED &&
+ ((attributes & XATTR_ATTRIBS_MASK) || name_hidden))
{
int fd, needs_close;
/* set any DOS extended attributes */
if (!server_get_unix_fd( *handle, 0, &fd, &needs_close, NULL, NULL ))
{
- if (fd_set_dos_attrib( fd, attributes ) == -1 && errno != ENOTSUP)
+ if (fd_set_dos_attrib( fd, attributes, TRUE ) == -1 && errno != ENOTSUP)
WARN( "Failed to set extended attribute " SAMBA_XATTR_DOS_ATTRIB ". errno %d (%s)",
errno, strerror( errno ) );
if (needs_close) close( fd );
@@ -4561,10 +4565,14 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
{
const FILE_BASIC_INFORMATION *info = ptr;
LARGE_INTEGER mtime, atime;
+ char *unix_name;
if ((status = server_get_unix_fd( handle, 0, &fd, &needs_close, NULL, NULL )))
return io->u.Status = status;
+ if ((status = server_get_unix_name( handle, &unix_name )))
+ unix_name = NULL;
+
mtime.QuadPart = info->LastWriteTime.QuadPart == -1 ? 0 : info->LastWriteTime.QuadPart;
atime.QuadPart = info->LastAccessTime.QuadPart == -1 ? 0 : info->LastAccessTime.QuadPart;
@@ -4572,9 +4580,13 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
status = set_file_times( fd, &mtime, &atime );
if (status == STATUS_SUCCESS && info->FileAttributes)
- status = fd_set_file_info( fd, info->FileAttributes );
+ {
+ BOOL force_xattr = unix_name && is_hidden_file( unix_name );
+ status = fd_set_file_info( fd, info->FileAttributes, force_xattr );
+ }
if (needs_close) close( fd );
+ free( unix_name );
}
else status = STATUS_INVALID_PARAMETER_3;
break;
--
2.40.0

View File

@@ -0,0 +1,43 @@
From 6fa8d2eea71223e52ab957247cb91011404ee381 Mon Sep 17 00:00:00 2001
From: Torge Matthies <tmatthies@codeweavers.com>
Date: Thu, 30 Mar 2023 05:46:39 +0200
Subject: [PATCH 6/6] ntdll/tests: Increase margins in timer merging tests.
This test failed in the GitLab test runner.
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
---
dlls/ntdll/tests/threadpool.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/tests/threadpool.c b/dlls/ntdll/tests/threadpool.c
index 168f00c2852..c23157d3207 100644
--- a/dlls/ntdll/tests/threadpool.c
+++ b/dlls/ntdll/tests/threadpool.c
@@ -1563,18 +1563,18 @@ static void test_tp_window_length(void)
info2.ticks = 0;
NtQuerySystemTime( &when );
- when.QuadPart += (ULONGLONG)250 * 10000;
+ when.QuadPart += (ULONGLONG)500 * 10000;
pTpSetTimer(timer2, &when, 0, 0);
- Sleep(50);
- when.QuadPart -= (ULONGLONG)150 * 10000;
- pTpSetTimer(timer1, &when, 0, 75);
+ Sleep(100);
+ when.QuadPart -= (ULONGLONG)300 * 10000;
+ pTpSetTimer(timer1, &when, 0, 150);
result = WaitForSingleObject(semaphore, 1000);
ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", result);
result = WaitForSingleObject(semaphore, 1000);
ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", result);
ok(info1.ticks != 0 && info2.ticks != 0, "expected that ticks are nonzero\n");
- ok(info2.ticks >= info1.ticks + 75 || broken(info2.ticks < info1.ticks + 75) /* Win 2008 */,
+ ok(info2.ticks >= info1.ticks + 150 || broken(info2.ticks < info1.ticks + 150) /* Win 2008 */,
"expected that timers are not merged\n");
/* timers will be merged */
--
2.40.0

View File

@@ -0,0 +1,2 @@
Fixes: [53826] Attempting to install / update battle.net fails with Qt error
MR: [1148] ntdll: Mark created files beginning with a dot as not hidden.

Some files were not shown because too many files have changed in this diff Show More