Compare commits

..

17 Commits

Author SHA1 Message Date
Alistair Leslie-Hughes
b09545bc48 Release v10.12 2025-07-12 20:06:05 +10:00
Alistair Leslie-Hughes
8c98aa0c22 Added msxml_normalize_line patchset 2025-07-12 15:22:15 +10:00
Alistair Leslie-Hughes
31cab243e7 Added comctl32_animate_avi patchset 2025-07-11 19:33:15 +10:00
Alistair Leslie-Hughes
caa47e6c73 Rebase against d1f6b3771376cc8909be712b127125e1b9e4f5d1. 2025-07-11 08:16:46 +10:00
Alistair Leslie-Hughes
d102a32693 Rebase against 177848adf54f6871e558be6b42ee2478a522c3d2. 2025-07-09 09:35:33 +10:00
Alistair Leslie-Hughes
784382204b Updated msxml3-element_props patchset
Add missing patch.
2025-07-08 15:54:55 +10:00
Alistair Leslie-Hughes
3e94d12465 Release v10.11 2025-06-28 14:10:47 +10:00
Alistair Leslie-Hughes
f102154244 Updated vkd3d-latest patchset 2025-06-27 08:23:40 +10:00
Alistair Leslie-Hughes
26c1f46d89 Rebase against 80bc1338bea7d9dac78ab449b4505e5bb91e7ba3. 2025-06-27 08:16:31 +10:00
Elizabeth Figura
8dd91084bf Rebase against 1c586991c802a7368137ae2c0470880bb359de78. 2025-06-25 19:31:10 -05:00
Alistair Leslie-Hughes
e232cccc6a Updated vkd3d-latest patchset 2025-06-25 10:56:46 +10:00
Alistair Leslie-Hughes
2ed03c4ed0 Rebase against 69e3a51b3dc50dd1697c64f7b2bcde54baa0a300. 2025-06-25 10:56:05 +10:00
Elizabeth Figura
5054f7359b Rebase against 7f0fac46d718e0961314d0c50342dcf336b9803d. 2025-06-23 16:47:48 -05:00
Alistair Leslie-Hughes
7db26cf727 Rebase against e9dcdf38041a1911d37117e0219dced5ba5dbf7f. 2025-06-22 18:07:01 +10:00
Elizabeth Figura
1d80a4ba4e Rebase against 057e1d73e84b06fac90cba96dbf0305d219df3d5. 2025-06-19 16:36:06 -05:00
Alistair Leslie-Hughes
5cc4d90333 Rebase against 73b75afe55144727775e8a865f82ed843c19b3bb. 2025-06-19 11:06:28 +10:00
Alistair Leslie-Hughes
a044166651 Updated vkd3d-latest patchset
Squash and rebase.
2025-06-18 10:25:22 +10:00
50 changed files with 23881 additions and 8661 deletions

View File

@@ -1,4 +1,4 @@
From 8aa6fb73e3142d86ba354c204313b8a74a5fa43d Mon Sep 17 00:00:00 2001
From fb422ad56e3549e81d3b60afc77b0a0c6a56f672 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 2 Oct 2014 19:53:46 +0200
Subject: [PATCH] winelib: Append '(Staging)' at the end of the version string.
@@ -8,10 +8,10 @@ Subject: [PATCH] winelib: Append '(Staging)' at the end of the version string.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index f86a5decb07..3d7f9cc96e6 100644
index b4ede761391..ea6bd2fae3c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3910,7 +3910,7 @@ dnl Rules for generated source files
@@ -3728,7 +3728,7 @@ dnl Rules for generated source files
WINE_APPEND_RULE(
[dlls/ntdll/unix/version.c: dummy
@@ -19,7 +19,7 @@ index f86a5decb07..3d7f9cc96e6 100644
+ @version=\`(GIT_DIR=${wine_srcdir}.git git describe HEAD 2>/dev/null || echo \"wine-\$(PACKAGE_VERSION)\") | sed -n -e '\$\$s/\(.*\)/const char wine_build[[]] = \"\\1 (Staging)\";/p'\` && (echo \$\$version | cmp -s - \$[@]) || echo \$\$version >\$[@] || (rm -f \$[@] && exit 1)
programs/winetest/build.rc: dummy
@build=\"STRINGTABLE { 1 \\\"\`GIT_DIR=${wine_srcdir}.git git rev-parse HEAD 2>/dev/null\`\\\" }\" && (echo \$\$build | cmp -s - \$[@]) || echo \$\$build >\$[@] || (rm -f \$[@] && exit 1)
programs/winetest/build.nfo:
dlls/wineandroid.drv/wine-debug.apk: dlls/wineandroid.drv/build.gradle ${wine_srcdir}dlls/wineandroid.drv/AndroidManifest.xml ${wine_srcdir}dlls/wineandroid.drv/WineActivity.java ${wine_srcdir}dlls/wineandroid.drv/wine.svg
--
2.33.0
2.47.2

View File

@@ -1,4 +1,4 @@
From f9f5002e4ce6417dd196d53b50c51a3b224015d3 Mon Sep 17 00:00:00 2001
From 9cf09446b0bf5da7988d1ba30c24d392c7a01f4b Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 12 Nov 2019 18:13:20 +0800
Subject: [PATCH] comctl32: Bump version to 6.0.
@@ -8,39 +8,25 @@ and refuses to run, changing DLL version to 6.0 makes it run.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
---
dlls/comctl32/comctl32.h | 2 +-
dlls/comctl32/comctl32.rc | 2 +-
include/commctrl.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h
index 51f4337add2..3fe8905abea 100644
--- a/dlls/comctl32/comctl32.h
+++ b/dlls/comctl32/comctl32.h
@@ -194,7 +194,7 @@ BOOL Str_SetPtrAtoW(LPWSTR *lppDest, LPCSTR lpSrc);
BOOL Str_SetPtrWtoA(LPSTR *lppDest, LPCWSTR lpSrc);
BOOL imagelist_has_alpha(HIMAGELIST, UINT);
-#define COMCTL32_VERSION_MINOR 81
+#define COMCTL32_VERSION_MINOR 0
/* Our internal stack structure of the window procedures to subclass */
typedef struct _SUBCLASSPROCS {
diff --git a/dlls/comctl32/comctl32.rc b/dlls/comctl32/comctl32.rc
index c9aa1ba6253..be6e2425193 100644
index 2c62dbe2720..473de211c67 100644
--- a/dlls/comctl32/comctl32.rc
+++ b/dlls/comctl32/comctl32.rc
@@ -114,7 +114,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
@@ -113,7 +113,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define WINE_FILEDESCRIPTION_STR "Wine Common Controls"
#define WINE_FILENAME_STR "comctl32.dll"
#define WINE_FILEVERSION COMCTL32_VERSION, COMCTL32_VERSION_MINOR, 4704, 1100
-#define WINE_FILEVERSION_STR "5.81"
+#define WINE_FILEVERSION_STR "6.00.4704.1100"
#define WINE_PRODUCTVERSION WINE_FILEVERSION
#define WINE_PRODUCTVERSION_STR WINE_FILEVERSION_STR
-#define WINE_FILEVERSION COMCTL32_VERSION,81,4704,1100
+#define WINE_FILEVERSION COMCTL32_VERSION,0,4704,1100
#include "wine/wine_common_ver.rc"
diff --git a/include/commctrl.h b/include/commctrl.h
index a54de13d8b2..e0b0e22d4dc 100644
index 235704a76dd..5a67c1284a0 100644
--- a/include/commctrl.h
+++ b/include/commctrl.h
@@ -59,7 +59,7 @@ enum _LI_METRIC
@@ -53,5 +39,5 @@ index a54de13d8b2..e0b0e22d4dc 100644
#define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
#define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
--
2.40.1
2.47.2

View File

@@ -0,0 +1,24 @@
From 8a9c55d23750ca2650eba518e46549d8b5d94b43 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 11 Jul 2025 14:11:36 +1000
Subject: [PATCH] comctl32: Animate support AVI msvc codex
---
dlls/comctl32/animate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c
index 46e1e37b72d..717422c784f 100644
--- a/dlls/comctl32/animate.c
+++ b/dlls/comctl32/animate.c
@@ -644,6 +644,7 @@ static BOOL ANIMATE_GetAviCodec(ANIMATE_INFO *infoPtr)
/* check uncompressed AVI */
if ((infoPtr->ash.fccHandler == mmioFOURCC('D', 'I', 'B', ' ')) ||
(infoPtr->ash.fccHandler == mmioFOURCC('R', 'L', 'E', ' ')) ||
+ (infoPtr->ash.fccHandler == mmioFOURCC('m', 's', 'v', 'c')) ||
(infoPtr->ash.fccHandler == mmioFOURCC(0, 0, 0, 0)))
{
infoPtr->hic = 0;
--
2.47.2

View File

@@ -0,0 +1,24 @@
From b8cce6663a956f8fb8f07700672e378b44b1af1c Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 11 Jul 2025 15:21:07 +1000
Subject: [PATCH] comctl32: Animate to support RLE8 codex
---
dlls/comctl32/animate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c
index 717422c784f..ca4fae85a11 100644
--- a/dlls/comctl32/animate.c
+++ b/dlls/comctl32/animate.c
@@ -645,6 +645,7 @@ static BOOL ANIMATE_GetAviCodec(ANIMATE_INFO *infoPtr)
if ((infoPtr->ash.fccHandler == mmioFOURCC('D', 'I', 'B', ' ')) ||
(infoPtr->ash.fccHandler == mmioFOURCC('R', 'L', 'E', ' ')) ||
(infoPtr->ash.fccHandler == mmioFOURCC('m', 's', 'v', 'c')) ||
+ (infoPtr->ash.fccHandler == mmioFOURCC('m', 'r', 'l', 'e')) ||
(infoPtr->ash.fccHandler == mmioFOURCC(0, 0, 0, 0)))
{
infoPtr->hic = 0;
--
2.47.2

View File

@@ -0,0 +1,119 @@
From 2ef9715ae9fffa0a6d7cdf0dc04e8de7eb245ce4 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 11 Jul 2025 18:07:39 +1000
Subject: [PATCH] comctl32: Animate control doesn't support compressed AVI
The Animate control only supporst uncompress AVI with the excpetion of RLE8.
---
dlls/comctl32/animate.c | 64 ++---------------------------------------
1 file changed, 3 insertions(+), 61 deletions(-)
diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c
index ca4fae85a11..74516db81f5 100644
--- a/dlls/comctl32/animate.c
+++ b/dlls/comctl32/animate.c
@@ -39,14 +39,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(animate);
-static struct {
- HMODULE hModule;
- HIC (WINAPI *fnICOpen)(DWORD, DWORD, UINT);
- LRESULT (WINAPI *fnICClose)(HIC);
- LRESULT (WINAPI *fnICSendMessage)(HIC, UINT, DWORD_PTR, DWORD_PTR);
- DWORD (WINAPIV *fnICDecompress)(HIC,DWORD,LPBITMAPINFOHEADER,LPVOID,LPBITMAPINFOHEADER,LPVOID);
-} fnIC;
-
typedef struct
{
/* reference to input stream (file or resource) */
@@ -189,11 +181,6 @@ static void ANIMATE_Free(ANIMATE_INFO *infoPtr)
}
Free (infoPtr->lpIndex);
infoPtr->lpIndex = NULL;
- if (infoPtr->hic)
- {
- fnIC.fnICClose(infoPtr->hic);
- infoPtr->hic = 0;
- }
Free (infoPtr->inbih);
infoPtr->inbih = NULL;
Free (infoPtr->outbih);
@@ -342,13 +329,6 @@ static BOOL ANIMATE_DrawFrame(ANIMATE_INFO *infoPtr, HDC hDC)
mmioSeek(infoPtr->hMMio, infoPtr->lpIndex[infoPtr->currFrame], SEEK_SET);
mmioRead(infoPtr->hMMio, infoPtr->indata, infoPtr->ash.dwSuggestedBufferSize);
- if (infoPtr->hic &&
- fnIC.fnICDecompress(infoPtr->hic, 0, infoPtr->inbih, infoPtr->indata,
- infoPtr->outbih, infoPtr->outdata) != ICERR_OK) {
- WARN("Decompression error\n");
- return FALSE;
- }
-
ANIMATE_PaintFrame(infoPtr, hDC);
if (infoPtr->currFrame++ >= infoPtr->nToFrame) {
@@ -649,39 +629,12 @@ static BOOL ANIMATE_GetAviCodec(ANIMATE_INFO *infoPtr)
(infoPtr->ash.fccHandler == mmioFOURCC(0, 0, 0, 0)))
{
infoPtr->hic = 0;
- return TRUE;
- }
-
- /* try to get a decompressor for that type */
- infoPtr->hic = fnIC.fnICOpen(ICTYPE_VIDEO, infoPtr->ash.fccHandler, ICMODE_DECOMPRESS);
- if (!infoPtr->hic) {
- WARN("Can't load codec for the file\n");
- return FALSE;
- }
-
- outSize = fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_GET_FORMAT,
- (DWORD_PTR)infoPtr->inbih, 0L);
-
- if (!(infoPtr->outbih = Alloc(outSize)))
- return FALSE;
-
- if (fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_GET_FORMAT,
- (DWORD_PTR)infoPtr->inbih, (DWORD_PTR)infoPtr->outbih) != ICERR_OK)
- {
- WARN("Can't get output BIH\n");
- return FALSE;
+ return TRUE;
}
- if (!(infoPtr->outdata = Alloc(infoPtr->outbih->biSizeImage)))
- return FALSE;
+ FIXME("Unsupported %s\n", debugstr_fourcc(infoPtr->ash.fccHandler));
- if (fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_BEGIN,
- (DWORD_PTR)infoPtr->inbih, (DWORD_PTR)infoPtr->outbih) != ICERR_OK) {
- WARN("Can't begin decompression\n");
- return FALSE;
- }
-
- return TRUE;
+ return FALSE;
}
@@ -790,17 +743,6 @@ static BOOL ANIMATE_Create(HWND hWnd, const CREATESTRUCTW *lpcs)
{
ANIMATE_INFO *infoPtr;
- if (!fnIC.hModule)
- {
- fnIC.hModule = LoadLibraryW(L"msvfw32.dll");
- if (!fnIC.hModule) return FALSE;
-
- fnIC.fnICOpen = (void*)GetProcAddress(fnIC.hModule, "ICOpen");
- fnIC.fnICClose = (void*)GetProcAddress(fnIC.hModule, "ICClose");
- fnIC.fnICSendMessage = (void*)GetProcAddress(fnIC.hModule, "ICSendMessage");
- fnIC.fnICDecompress = (void*)GetProcAddress(fnIC.hModule, "ICDecompress");
- }
-
/* allocate memory for info structure */
infoPtr = Alloc(sizeof(*infoPtr));
if (!infoPtr) return FALSE;
--
2.47.2

View File

@@ -0,0 +1,2 @@
Fixes: [52278] comctl32: Animate support AVI msvc codex.

View File

@@ -1,4 +1,4 @@
From 9829e3c307e8019a3a2b9204d1133833863da5f1 Mon Sep 17 00:00:00 2001
From b4f92dd9311882607cedd7d247ddf3069ae33d8b Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sat, 7 Jul 2018 12:57:47 +0200
Subject: [PATCH] server: Create eventfd descriptors for pseudo-fd objects and
@@ -11,10 +11,10 @@ Subject: [PATCH] server: Create eventfd descriptors for pseudo-fd objects and
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/server/fd.c b/server/fd.c
index 6a1b89b0e54..8ba704344cf 100644
index 737f7ee67b9..01a055f8b2d 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -97,6 +97,7 @@
@@ -95,6 +95,7 @@
#include "handle.h"
#include "process.h"
#include "request.h"
@@ -22,7 +22,7 @@ index 6a1b89b0e54..8ba704344cf 100644
#include "winternl.h"
#include "winioctl.h"
@@ -198,6 +199,7 @@ struct fd
@@ -159,6 +160,7 @@ struct fd
struct completion *completion; /* completion object attached to this fd */
apc_param_t comp_key; /* completion key to set in completion events */
unsigned int comp_flags; /* completion flags */
@@ -40,7 +40,7 @@ index 6a1b89b0e54..8ba704344cf 100644
}
/* check if the desired access is possible without violating */
@@ -1784,6 +1789,7 @@ static struct fd *alloc_fd_object(void)
@@ -1786,6 +1791,7 @@ static struct fd *alloc_fd_object(void)
fd->poll_index = -1;
fd->completion = NULL;
fd->comp_flags = 0;
@@ -48,7 +48,7 @@ index 6a1b89b0e54..8ba704344cf 100644
init_async_queue( &fd->read_q );
init_async_queue( &fd->write_q );
init_async_queue( &fd->wait_q );
@@ -1823,11 +1829,15 @@ struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *use
@@ -1827,11 +1833,15 @@ struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *use
fd->completion = NULL;
fd->comp_flags = 0;
fd->no_fd_status = STATUS_BAD_DEVICE_TYPE;
@@ -64,7 +64,7 @@ index 6a1b89b0e54..8ba704344cf 100644
return fd;
}
@@ -2268,6 +2278,9 @@ void set_fd_signaled( struct fd *fd, int signaled )
@@ -2283,6 +2293,9 @@ void set_fd_signaled( struct fd *fd, int signaled )
if (fd->comp_flags & FILE_SKIP_SET_EVENT_ON_HANDLE) return;
fd->signaled = signaled;
if (signaled) wake_up( fd->user, 0 );
@@ -74,7 +74,7 @@ index 6a1b89b0e54..8ba704344cf 100644
}
/* check if events are pending and if yes return which one(s) */
@@ -2293,6 +2306,15 @@ int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry )
@@ -2324,6 +2337,15 @@ WCHAR *default_fd_get_full_name( struct object *obj, data_size_t max, data_size_
return ret;
}
@@ -91,19 +91,19 @@ index 6a1b89b0e54..8ba704344cf 100644
{
int events = 0;
diff --git a/server/file.h b/server/file.h
index 0ffe0e2c8dc..b5b1e2a1077 100644
index 7742e705e49..d86a9fc159d 100644
--- a/server/file.h
+++ b/server/file.h
@@ -106,6 +106,7 @@ extern char *dup_fd_name( struct fd *root, const char *name );
extern void get_nt_name( struct fd *fd, struct unicode_str *name );
@@ -110,6 +110,7 @@ extern void get_nt_name( struct fd *fd, struct unicode_str *name );
extern int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry );
extern WCHAR *default_fd_get_full_name( struct object *obj, data_size_t max, data_size_t *ret_len );
+extern int default_fd_get_esync_fd( struct object *obj, enum esync_type *type );
extern int default_fd_get_poll_events( struct fd *fd );
extern void default_poll_event( struct fd *fd, int event );
extern void fd_cancel_async( struct fd *fd, struct async *async );
diff --git a/server/named_pipe.c b/server/named_pipe.c
index b8ec17a787a..e01b28f725a 100644
index cdb27ed45c0..d4f8cf5e964 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -168,7 +168,7 @@ static const struct object_ops pipe_server_ops =
@@ -125,5 +125,5 @@ index b8ec17a787a..e01b28f725a 100644
no_signal, /* signal */
pipe_end_get_fd, /* get_fd */
--
2.35.1
2.47.2

View File

@@ -2,3 +2,4 @@ Fixes: [36692] Many multi-threaded applications have poor performance due to hea
Depends: ntdll-Junction_Points
Depends: server-PeekMessage
Depends: server-Signal_Thread
Disabled: True

View File

@@ -1,4 +1,4 @@
From a808aeb6fbb9c7cace366a262715607379ca1b58 Mon Sep 17 00:00:00 2001
From fec0755a2826b69658dd5a894dc424a8e1111f1a 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 00337aa72b7..375ca3abee3 100644
index 22c296cf213..70fa8009d3b 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -497,7 +497,6 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout )
@@ -450,7 +450,6 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout )
return FALSE;
}
@@ -25,10 +25,10 @@ index 00337aa72b7..375ca3abee3 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 b92e59396ac..364afc08b26 100644
index a82ca5941a2..eb565c6845b 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -5637,6 +5637,40 @@ static void test_LoadKeyboardLayoutEx(void)
@@ -6103,6 +6103,40 @@ static void test_LoadKeyboardLayoutEx( HKL orig_hkl )
ok_eq( old_hkl, GetKeyboardLayout( 0 ), HKL, "%p" );
}
@@ -69,19 +69,19 @@ index b92e59396ac..364afc08b26 100644
/* run the tests in a separate desktop to avoid interaction with other
* tests, current desktop state, or user actions. */
static void test_input_desktop( char **argv )
@@ -5730,6 +5764,7 @@ START_TEST(input)
@@ -6377,6 +6411,7 @@ START_TEST(input)
test_GetKeyState();
test_OemKeyScan();
test_rawinput(argv[0]);
+ test_GetKeyboardLayoutList();
test_DefRawInputProc();
test_ScheduleDispatchNotification();
if(pGetMouseMovePointsEx)
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
index 1886ff979d7..1834ae40441 100644
index 1f824f85c50..e51fe494b29 100644
--- a/dlls/win32u/input.c
+++ b/dlls/win32u/input.c
@@ -1266,11 +1266,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
@@ -1379,11 +1379,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
*/
UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
{
@@ -94,7 +94,7 @@ index 1886ff979d7..1834ae40441 100644
HKL layout;
TRACE_(keyboard)( "size %d, layouts %p.\n", size, layouts );
@@ -1284,33 +1280,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
@@ -1397,33 +1393,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
if (size && layouts)
{
layouts[count - 1] = layout;
@@ -129,5 +129,5 @@ index 1886ff979d7..1834ae40441 100644
return count;
--
2.43.0
2.47.2

View File

@@ -1,4 +1,4 @@
From 0d4a7cf6b9bb3a57a098762113ca1750c43a810e Mon Sep 17 00:00:00 2001
From e27b26f100bedf8f8374333ce9026fd96ed9102b Mon Sep 17 00:00:00 2001
From: Torge Matthies <tmatthies@codeweavers.com>
Date: Fri, 25 Oct 2024 10:47:30 +0200
Subject: [PATCH] mf/tests: Add network bytestream tests.
@@ -8,10 +8,10 @@ Subject: [PATCH] mf/tests: Add network bytestream tests.
1 file changed, 347 insertions(+)
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index d0f1f1cf0a4..61daaf35741 100644
index 1070e9c1b2d..9d41b05fad3 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -4726,6 +4726,7 @@ static void test_evr(void)
@@ -4908,6 +4908,7 @@ static void test_evr(void)
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
@@ -19,8 +19,8 @@ index d0f1f1cf0a4..61daaf35741 100644
check_interface(sink, &IID_IMFMediaSinkPreroll, TRUE);
check_interface(sink, &IID_IMFVideoRenderer, TRUE);
@@ -6803,6 +6804,351 @@ static void test_media_session_Close(void)
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
@@ -7130,6 +7131,351 @@ static void test_media_session_thinning(void)
ok(hr == S_OK, "Shutdown failure, hr %#lx.\n", hr);
}
+static void test_network_bytestream(void)
@@ -371,13 +371,14 @@ index d0f1f1cf0a4..61daaf35741 100644
START_TEST(mf)
{
init_functions();
@@ -6838,5 +7184,6 @@ START_TEST(mf)
@@ -7165,6 +7511,7 @@ START_TEST(mf)
test_media_session_Start();
test_MFEnumDeviceSources();
test_media_session_Close();
+ test_network_bytestream();
test_media_session_source_shutdown();
test_media_session_thinning();
}
--
2.45.2
2.47.2

View File

@@ -0,0 +1,97 @@
From 2135156d666a6a7a779326b7f1fdcbd2a8d58c8a Mon Sep 17 00:00:00 2001
From: Spencer Wallace <spencerwallace@esri.com>
Date: Mon, 24 Feb 2025 13:33:18 -0800
Subject: [PATCH] msxml3: Correct looping of Document Element properties.
---
dlls/msxml3/element.c | 2 ++
dlls/msxml3/tests/domdoc.c | 53 ++++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+)
diff --git a/dlls/msxml3/element.c b/dlls/msxml3/element.c
index 0fe72dcef9c..3e3c2d06169 100644
--- a/dlls/msxml3/element.c
+++ b/dlls/msxml3/element.c
@@ -1812,6 +1812,8 @@ static HRESULT domelem_get_item(const xmlNodePtr node, LONG index, IXMLDOMNode *
*item = create_node( (xmlNodePtr) curr );
return S_OK;
}
+
+ ++attrIndex;
}
if (!node->nsDef)
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c
index dcb83f781ba..84a1f330582 100644
--- a/dlls/msxml3/tests/domdoc.c
+++ b/dlls/msxml3/tests/domdoc.c
@@ -10224,6 +10224,15 @@ static void test_get_attributes(void)
L"xmlns:dcterms",
L"xmlns:foaf"
};
+ const WCHAR *attributes[] =
+ {
+ L"rdf:about",
+ L"dcterms:created",
+ L"xmlns:oslc_am",
+ L"xmlns:rdf",
+ L"xmlns:dcterms",
+ L"xmlns:foaf"
+ };
const get_attributes_t *entry = get_attributes;
IXMLDOMNamedNodeMap *map;
IXMLDOMDocument *doc, *doc2;
@@ -10505,6 +10514,50 @@ static void test_get_attributes(void)
IXMLDOMDocument_Release(doc);
+ str = SysAllocString(L"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ L"<rdf:RDF rdf:about=\"foo\""
+ L" dcterms:created=\"2025\""
+ L" xmlns:oslc_am=\"http://open-services.net/ns/am#\""
+ L" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\""
+ L" xmlns:dcterms=\"http://purl.org/dc/terms/\""
+ L" xmlns:foaf=\"http://xmlns.com/foaf/0.1/\" >"
+ L"</rdf:RDF>");
+
+ doc = create_document(&IID_IXMLDOMDocument2);
+
+ hr = IXMLDOMDocument_loadXML(doc, str, &b);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(b == VARIANT_TRUE, "got %d\n", b);
+
+ hr = IXMLDOMDocument_get_documentElement(doc, &elem);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+
+ hr = IXMLDOMElement_get_attributes(elem, &map);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+
+ length = -1;
+ hr = IXMLDOMNamedNodeMap_get_length(map, &length);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(length == 6, "length %#lx.\n", length);
+
+ for(i=0; i < length; i++)
+ {
+ hr = IXMLDOMNamedNodeMap_get_item(map, i, &node2);
+ ok( hr == S_OK, "Unexpected hr %#lx (%ld).\n", hr, i);
+
+ hr = IXMLDOMNode_get_nodeName(node2, &str);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!lstrcmpW(str, attributes[i]), "got %s\n", wine_dbgstr_w(str));
+ SysFreeString(str);
+
+ IXMLDOMNode_Release(node2);
+ }
+
+ IXMLDOMNamedNodeMap_Release(map);
+ IXMLDOMElement_Release(elem);
+
+ IXMLDOMDocument_Release(doc);
+
free_bstrs();
}
--
2.47.2

View File

@@ -0,0 +1,46 @@
From 9be306cd143e6bf5f300a321101fb713edb9155b Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sat, 12 Jul 2025 15:20:04 +1000
Subject: [PATCH] msxml: Support ISAXXMLReader::putFeature
normalize-line-breaks option
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36686
---
dlls/msxml3/saxreader.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c
index 71a7f334420..9650af38597 100644
--- a/dlls/msxml3/saxreader.c
+++ b/dlls/msxml3/saxreader.c
@@ -60,7 +60,8 @@ typedef enum
SuppressValidationfatalError = 1 << 12,
UseInlineSchema = 1 << 13,
UseSchemaLocation = 1 << 14,
- LexicalHandlerParEntities = 1 << 15
+ LexicalHandlerParEntities = 1 << 15,
+ NormalizeLineBreaks = 1 << 16,
} saxreader_feature;
struct saxreader_feature_pair
@@ -78,6 +79,7 @@ static const struct saxreader_feature_pair saxreader_feature_map[] = {
{ Namespaces, L"http://xml.org/sax/features/namespaces" },
{ ProhibitDTD, L"prohibit-dtd" },
{ SchemaValidation, L"schema-validation" },
+ { NormalizeLineBreaks, L"normalize-line-breaks" },
};
static saxreader_feature get_saxreader_feature(const WCHAR *name)
@@ -3159,7 +3161,8 @@ static HRESULT WINAPI isaxxmlreader_putFeature(
if (feature == LexicalHandlerParEntities ||
feature == ProhibitDTD ||
feature == ExternalGeneralEntities ||
- feature == ExternalParameterEntities)
+ feature == ExternalParameterEntities ||
+ feature == NormalizeLineBreaks)
{
FIXME("(%p)->(%s %x) stub\n", This, debugstr_w(feature_name), value);
return set_feature_value(This, feature, value);
--
2.47.2

View File

@@ -0,0 +1,2 @@
Fixes: [36686] msxml: Support ISAXXMLReader::putFeature normalize-line-breaks option

View File

@@ -1,4 +1,4 @@
From e5c4a6bd332d7d125e9db79fa29b14e55e3a1ee5 Mon Sep 17 00:00:00 2001
From 32419947818521387ec9de7b5ca92f9269819bd2 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Mon, 25 Nov 2019 12:19:20 +0300
Subject: [PATCH] ntdll: Force virtual memory allocation order.
@@ -12,14 +12,14 @@ are from higher memory than they expect.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48175
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46568
---
dlls/ntdll/unix/virtual.c | 402 +++++++++++++++-----------------------
1 file changed, 162 insertions(+), 240 deletions(-)
dlls/ntdll/unix/virtual.c | 400 +++++++++++++++-----------------------
1 file changed, 162 insertions(+), 238 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index a36c919d47f..2f682e70ec2 100644
index 2353e51f5e8..a5270649c0d 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -1324,43 +1324,15 @@ static struct file_view *find_view_range( const void *addr, size_t size )
@@ -1492,43 +1492,15 @@ static struct file_view *find_view_range( const void *addr, size_t size )
}
@@ -71,7 +71,7 @@ index a36c919d47f..2f682e70ec2 100644
/***********************************************************************
* try_map_free_area
@@ -1393,112 +1365,6 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
@@ -1561,112 +1533,6 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
}
@@ -184,7 +184,7 @@ index a36c919d47f..2f682e70ec2 100644
/***********************************************************************
* remove_reserved_area
*
@@ -1613,8 +1479,7 @@ static void free_view( struct file_view *view )
@@ -1781,8 +1647,7 @@ static void free_view( struct file_view *view )
*/
static void unregister_view( struct file_view *view )
{
@@ -194,7 +194,7 @@ index a36c919d47f..2f682e70ec2 100644
wine_rb_remove( &views_tree, &view->entry );
}
@@ -1642,8 +1507,7 @@ static void delete_view( struct file_view *view ) /* [in] View */
@@ -1810,8 +1675,7 @@ static void delete_view( struct file_view *view ) /* [in] View */
static void register_view( struct file_view *view )
{
wine_rb_put( &views_tree, view->base, &view->entry );
@@ -204,7 +204,7 @@ index a36c919d47f..2f682e70ec2 100644
}
@@ -1919,89 +1783,176 @@ static inline void *unmap_extra_space( void *ptr, size_t total_size, size_t want
@@ -2099,89 +1963,176 @@ static inline void *unmap_extra_space( void *ptr, size_t total_size, size_t want
return ptr;
}
@@ -223,18 +223,18 @@ index a36c919d47f..2f682e70ec2 100644
+ char *alloc_start;
- if (preload_reserve_end >= end)
+ if (area->top_down)
{
- {
- if (preload_reserve_start <= start) return NULL; /* no space in that area */
- if (preload_reserve_start < end) end = preload_reserve_start;
- }
- else if (preload_reserve_start <= start)
+ if (area->top_down)
{
- if (preload_reserve_end > start) start = preload_reserve_end;
+ if (end - start < area->size) return NULL;
+ alloc_start = ROUND_ADDR( end - area->size, area->align_mask );
+ return try_map_free_area( start, alloc_start + area->size, area->step, alloc_start, area->size, area->unix_prot );
}
- else if (preload_reserve_start <= start)
- {
- if (preload_reserve_end > start) start = preload_reserve_end;
- }
- else /* range is split in two by the preloader reservation, try both parts */
+
+ alloc_start = ROUND_ADDR( start + area->align_mask, area->align_mask );
@@ -442,16 +442,16 @@ index a36c919d47f..2f682e70ec2 100644
}
/***********************************************************************
@@ -2112,43 +2063,12 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
@@ -2299,41 +2250,12 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
void *start = address_space_start;
void *end = min( user_space_limit, host_addr_space_limit );
size_t host_size = ROUND_SIZE( 0, size, host_page_mask );
- size_t unmap_size, view_size = host_size + align_mask + 1;
-
if (limit_low && (void *)limit_low > start) start = (void *)limit_low;
if (limit_high && (void *)limit_high < end) end = (char *)limit_high + 1;
- if ((ptr = map_reserved_area( start, end, host_size, top_down, get_unix_prot(vprot), align_mask )))
- if ((ptr = map_reserved_area( start, end, host_size, top_down, unix_prot, align_mask )))
- {
- TRACE( "got mem in reserved area %p-%p\n", ptr, (char *)ptr + size );
- goto done;
@@ -459,7 +459,7 @@ index a36c919d47f..2f682e70ec2 100644
-
- if (start > address_space_start || end < host_addr_space_limit || top_down)
- {
- if (!(ptr = map_free_area( start, end, host_size, top_down, get_unix_prot(vprot), align_mask )))
- if (!(ptr = map_free_area( start, end, host_size, top_down, unix_prot, align_mask )))
- return STATUS_NO_MEMORY;
- TRACE( "got mem with map_free_area %p-%p\n", ptr, (char *)ptr + size );
- goto done;
@@ -467,11 +467,11 @@ index a36c919d47f..2f682e70ec2 100644
-
- for (;;)
- {
- if ((ptr = anon_mmap_alloc( view_size, get_unix_prot(vprot) )) == MAP_FAILED)
- if ((ptr = anon_mmap_alloc( view_size, unix_prot )) == MAP_FAILED)
- {
- status = (errno == ENOMEM) ? STATUS_NO_MEMORY : STATUS_INVALID_PARAMETER;
- ERR( "anon mmap error %s, size %p, unix_prot %#x\n",
- strerror(errno), (void *)view_size, get_unix_prot( vprot ) );
- strerror(errno), (void *)view_size, unix_prot );
- return status;
- }
- TRACE( "got mem with anon mmap %p-%p\n", ptr, (char *)ptr + size );
@@ -481,14 +481,12 @@ index a36c919d47f..2f682e70ec2 100644
- if (unmap_size) munmap( ptr, unmap_size );
- }
- ptr = unmap_extra_space( ptr, view_size, host_size, align_mask );
+ if (!(ptr = alloc_free_area( start, end, host_size, top_down, get_unix_prot( vprot ), align_mask )))
+ if (!(ptr = alloc_free_area( start, end, host_size, top_down, unix_prot, align_mask )))
+ return STATUS_NO_MEMORY;
}
-done:
done:
status = create_view( view_ret, ptr, size, vprot );
if (status != STATUS_SUCCESS) unmap_area( ptr, size );
return status;
@@ -3413,6 +3333,7 @@ static unsigned int virtual_map_section( HANDLE handle, PVOID *addr_ptr, ULONG_P
@@ -3602,6 +3524,7 @@ static unsigned int virtual_map_section( HANDLE handle, PVOID *addr_ptr, ULONG_P
done:
server_leave_uninterrupted_section( &virtual_mutex, &sigset );
if (needs_close) close( unix_handle );
@@ -496,7 +494,7 @@ index a36c919d47f..2f682e70ec2 100644
return res;
}
@@ -6624,6 +6545,7 @@ NTSTATUS WINAPI NtWow64AllocateVirtualMemory64( HANDLE process, ULONG64 *ret, UL
@@ -6875,6 +6798,7 @@ NTSTATUS WINAPI NtWow64AllocateVirtualMemory64( HANDLE process, ULONG64 *ret, UL
*ret = (ULONG_PTR)base;
*size_ptr = size;
}
@@ -505,5 +503,5 @@ index a36c919d47f..2f682e70ec2 100644
}
--
2.49.0
2.47.2

View File

@@ -1,4 +1,4 @@
From 09d76a4049ee4cc8bce4ffafc349da326fc058e0 Mon Sep 17 00:00:00 2001
From f918a9c53c678d3234cc6b51083af524087966bb Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Fri, 1 Dec 2023 14:55:20 -0600
Subject: [PATCH] ntdll: Exclude natively mapped areas from free areas list.
@@ -8,10 +8,10 @@ Subject: [PATCH] ntdll: Exclude natively mapped areas from free areas list.
1 file changed, 96 insertions(+), 9 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 2f682e70ec2..6170363f0a0 100644
index a5270649c0d..0fe761a3b85 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -135,6 +135,7 @@ struct file_view
@@ -144,6 +144,7 @@ struct file_view
#define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
#define VPROT_PLACEHOLDER 0x0400
#define VPROT_FREE_PLACEHOLDER 0x0800
@@ -19,7 +19,7 @@ index 2f682e70ec2..6170363f0a0 100644
/* Conversion from VPROT_* to Win32 flags */
static const BYTE VIRTUAL_Win32Flags[16] =
@@ -191,6 +192,8 @@ static void *working_set_limit = (void *)0x7fff0000;
@@ -200,6 +201,8 @@ static void *working_set_limit = (void *)0x7fff0000;
static void *host_addr_space_limit; /* top of the host virtual address space */
static struct file_view *arm64ec_view;
@@ -28,7 +28,7 @@ index 2f682e70ec2..6170363f0a0 100644
ULONG_PTR user_space_wow_limit = 0;
struct _KUSER_SHARED_DATA *user_shared_data = (void *)0x7ffe0000;
@@ -1212,7 +1215,9 @@ static void dump_view( struct file_view *view )
@@ -1380,7 +1383,9 @@ static void dump_view( struct file_view *view )
BYTE prot = get_page_vprot( addr );
TRACE( "View: %p - %p", addr, addr + view->size - 1 );
@@ -39,7 +39,7 @@ index 2f682e70ec2..6170363f0a0 100644
TRACE( " (builtin image)\n" );
else if (view->protect & VPROT_FREE_PLACEHOLDER)
TRACE( " (placeholder)\n" );
@@ -1332,6 +1337,8 @@ struct alloc_area
@@ -1500,6 +1505,8 @@ struct alloc_area
int unix_prot;
BOOL top_down;
UINT_PTR align_mask;
@@ -48,7 +48,7 @@ index 2f682e70ec2..6170363f0a0 100644
};
/***********************************************************************
@@ -1340,9 +1347,13 @@ struct alloc_area
@@ -1508,9 +1515,13 @@ struct alloc_area
* Try mmaping some expected free memory region, eventually stepping and
* retrying inside it, and return where it actually succeeded, or NULL.
*/
@@ -64,7 +64,7 @@ index 2f682e70ec2..6170363f0a0 100644
while (start && base <= start && (char*)start + size <= (char*)end)
{
if (anon_mmap_tryfixed( start, size, unix_prot, 0 ) != MAP_FAILED) return start;
@@ -1353,12 +1364,19 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
@@ -1521,12 +1532,19 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
strerror(errno), start, (char *)start + size, unix_prot );
return NULL;
}
@@ -85,7 +85,7 @@ index 2f682e70ec2..6170363f0a0 100644
}
return NULL;
@@ -1791,11 +1809,11 @@ static void *try_map_free_area_range( struct alloc_area *area, char *start, char
@@ -1971,11 +1989,11 @@ static void *try_map_free_area_range( struct alloc_area *area, char *start, char
{
if (end - start < area->size) return NULL;
alloc_start = ROUND_ADDR( end - area->size, area->align_mask );
@@ -99,7 +99,7 @@ index 2f682e70ec2..6170363f0a0 100644
}
static void *alloc_free_area_in_range( struct alloc_area *area, char *base, char *end )
@@ -1885,9 +1903,10 @@ static void *alloc_free_area( char *limit_low, char *limit_high, size_t size, BO
@@ -2065,9 +2083,10 @@ static void *alloc_free_area( char *limit_low, char *limit_high, size_t size, BO
struct range_entry *range, *ranges_start, *ranges_end;
char *reserve_start, *reserve_end;
struct alloc_area area;
@@ -111,7 +111,7 @@ index 2f682e70ec2..6170363f0a0 100644
TRACE("limit %p-%p, size %p, top_down %#x.\n", limit_low, limit_high, (void *)size, top_down);
@@ -1952,6 +1971,50 @@ static void *alloc_free_area( char *limit_low, char *limit_high, size_t size, BO
@@ -2132,6 +2151,50 @@ static void *alloc_free_area( char *limit_low, char *limit_high, size_t size, BO
if ((result = alloc_free_area_in_range( &area, base, end )))
break;
}
@@ -162,7 +162,7 @@ index 2f682e70ec2..6170363f0a0 100644
return result;
}
@@ -2012,6 +2075,17 @@ failed:
@@ -2191,6 +2254,17 @@ failed:
return status;
}
@@ -180,24 +180,24 @@ index 2f682e70ec2..6170363f0a0 100644
/***********************************************************************
* map_view
*
@@ -2067,7 +2141,15 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
@@ -2255,7 +2329,15 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
if (limit_high && (void *)limit_high < end) end = (char *)limit_high + 1;
if (!(ptr = alloc_free_area( start, end, host_size, top_down, get_unix_prot( vprot ), align_mask )))
if (!(ptr = alloc_free_area( start, end, host_size, top_down, unix_prot, align_mask )))
- return STATUS_NO_MEMORY;
+ {
+ WARN("Allocation failed, clearing native views.\n");
+
+ clear_native_views();
+ if (!is_win64) increase_try_map_step = FALSE;
+ ptr = alloc_free_area( (void *)limit_low, (void *)limit_high, size, top_down, get_unix_prot( vprot ), align_mask );
+ ptr = alloc_free_area( (void *)limit_low, (void *)limit_high, size, top_down, unix_prot, align_mask );
+ if (!is_win64) increase_try_map_step = TRUE;
+ if (!ptr) return STATUS_NO_MEMORY;
+ }
}
done:
status = create_view( view_ret, ptr, size, vprot );
if (status != STATUS_SUCCESS) unmap_area( ptr, size );
@@ -4503,7 +4585,12 @@ void virtual_set_force_exec( BOOL enable )
@@ -4746,7 +4828,12 @@ void virtual_set_force_exec( BOOL enable )
WINE_RB_FOR_EACH_ENTRY( view, &views_tree, struct file_view, entry )
{
/* file mappings are always accessible */
@@ -212,5 +212,5 @@ index 2f682e70ec2..6170363f0a0 100644
mprotect_range( view->base, view->size, commit, 0 );
}
--
2.49.0
2.47.2

View File

@@ -1,4 +1,4 @@
From c8fe58f588703421d2e85eb6376d93e3299f0880 Mon Sep 17 00:00:00 2001
From 32aeea846670432cf1e8d90defe6ca486b710559 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.
@@ -7,16 +7,16 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
---
configure.ac | 2 +
dlls/ntdll/Makefile.in | 2 +-
dlls/ntdll/tests/file.c | 159 ++++++++++++++++++---
dlls/ntdll/tests/file.c | 157 ++++++++++++++++++---
dlls/ntdll/unix/file.c | 302 ++++++++++++++++++++++++++++++++++++++++
include/ddk/ntifs.h | 5 +
5 files changed, 451 insertions(+), 19 deletions(-)
5 files changed, 450 insertions(+), 18 deletions(-)
diff --git a/configure.ac b/configure.ac
index a171e143136..abd91b6b51f 100644
index 6d093b52526..c9e433f4e6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2084,6 +2084,8 @@ AC_CHECK_FUNCS(\
@@ -2111,6 +2111,8 @@ AC_CHECK_FUNCS(\
prctl \
sched_getcpu \
sched_yield \
@@ -38,200 +38,8 @@ index f7558bb5d86..aad14d17e61 100644
EXTRADLLFLAGS = -nodefaultlibs
i386_EXTRADLLFLAGS = -Wl,--image-base,0x7bc00000
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index cc0afdbdb64..00f90552e84 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -38,6 +38,7 @@
#include "winuser.h"
#include "winioctl.h"
#include "winnls.h"
+#include "ddk/ntifs.h"
#ifndef IO_COMPLETION_ALL_ACCESS
#define IO_COMPLETION_ALL_ACCESS 0x001F0003
@@ -6028,32 +6029,154 @@ static void test_mailslot_name(void)
CloseHandle( device );
}
+static INT build_reparse_buffer(const WCHAR *filename, REPARSE_DATA_BUFFER **pbuffer)
+{
+ static INT header_size = offsetof(REPARSE_DATA_BUFFER, GenericReparseBuffer);
+ INT buffer_size, struct_size, data_size, string_len, prefix_len;
+ WCHAR *subst_dest, *print_dest;
+ REPARSE_DATA_BUFFER *buffer;
+
+ struct_size = offsetof(REPARSE_DATA_BUFFER, MountPointReparseBuffer.PathBuffer[0]);
+ prefix_len = strlen("\\??\\");
+ string_len = lstrlenW(&filename[prefix_len]);
+ data_size = (prefix_len + 2 * string_len + 2) * sizeof(WCHAR);
+ buffer_size = struct_size + data_size;
+ buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, buffer_size);
+ buffer->ReparseTag = IO_REPARSE_TAG_MOUNT_POINT;
+ buffer->ReparseDataLength = struct_size - header_size + data_size;
+ buffer->MountPointReparseBuffer.SubstituteNameLength = (prefix_len + string_len) * sizeof(WCHAR);
+ buffer->MountPointReparseBuffer.PrintNameOffset = (prefix_len + string_len + 1) * sizeof(WCHAR);
+ buffer->MountPointReparseBuffer.PrintNameLength = string_len * sizeof(WCHAR);
+ subst_dest = &buffer->MountPointReparseBuffer.PathBuffer[0];
+ print_dest = &buffer->MountPointReparseBuffer.PathBuffer[prefix_len + string_len + 1];
+ lstrcpyW(subst_dest, filename);
+ lstrcpyW(print_dest, &filename[prefix_len]);
+ *pbuffer = buffer;
+ return buffer_size;
+}
+
static void test_reparse_points(void)
{
- OBJECT_ATTRIBUTES attr;
- HANDLE handle;
- IO_STATUS_BLOCK io;
- NTSTATUS status;
+ WCHAR path[MAX_PATH], reparse_path[MAX_PATH], target_path[MAX_PATH], volnameW[MAX_PATH];
+ static const WCHAR reparseW[] = {'\\','r','e','p','a','r','s','e',0};
+ static const WCHAR targetW[] = {'\\','t','a','r','g','e','t',0};
+ static const WCHAR parentW[] = {'\\','.','.','\\',0};
+ static const WCHAR fooW[] = {'f','o','o',0};
+ static WCHAR volW[] = {'c',':','\\',0};
+ static const WCHAR dotW[] = {'.',0};
+ REPARSE_DATA_BUFFER *buffer = NULL;
+ DWORD dwret, dwLen, dwFlags;
UNICODE_STRING nameW;
- unsigned char reparse_data[1];
+ WCHAR *long_path;
+ INT buffer_len;
+ HANDLE handle;
+ BOOL bret;
+
+ /* Create a temporary folder for the junction point tests */
+ GetTempFileNameW(dotW, fooW, 0, path);
+ DeleteFileW(path);
+ if (!CreateDirectoryW(path, NULL))
+ {
+ win_skip("Unable to create a temporary junction point directory.\n");
+ return;
+ }
+
+ /* Check that the volume this folder is located on supports junction points */
+ pRtlDosPathNameToNtPathName_U(path, &nameW, NULL, NULL);
+ volW[0] = nameW.Buffer[4];
+ pRtlFreeUnicodeString( &nameW );
+ if (!GetVolumeNameForVolumeMountPointW(volW, volnameW, MAX_PATH))
+ {
+ win_skip("Failed to obtain volume name for current volume.\n");
+ return;
+ }
+ GetVolumeInformationW(volnameW, 0, 0, 0, &dwLen, &dwFlags, 0, 0);
+ if (!(dwFlags & FILE_SUPPORTS_REPARSE_POINTS))
+ {
+ skip("File system does not support reparse points.\n");
+ RemoveDirectoryW(path);
+ return;
+ }
+
+ /* 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 );
+ /* Create a destination folder for the junction point to target */
+ lstrcpyW(target_path, path);
+ for (int i=0; i<1; i++)
+ {
+ lstrcatW(target_path, parentW);
+ lstrcatW(target_path, path);
+ }
+ lstrcatW(target_path, targetW);
+ bret = CreateDirectoryW(target_path, NULL);
+ 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 );
+ /* 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);
+ for (int i=0; i<250; i++)
+ {
+ lstrcatW(long_path, parentW);
+ lstrcatW(long_path, path);
+ }
+ lstrcatW(long_path, targetW);
+
+ /* 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);
+ if (handle == INVALID_HANDLE_VALUE)
+ {
+ win_skip("Failed to open junction point directory handle (0x%lx).\n", GetLastError());
+ goto cleanup;
+ }
+ buffer_len = build_reparse_buffer(long_path, &buffer);
+ bret = DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
+ 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);
+ for (int i=0; i<200; i++)
+ {
+ lstrcatW(long_path, parentW);
+ 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);
+ if (handle == INVALID_HANDLE_VALUE)
+ {
+ win_skip("Failed to open junction point directory handle (0x%lx).\n", GetLastError());
+ goto cleanup;
+ }
+ buffer_len = build_reparse_buffer(long_path, &buffer);
+ 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);
+ HeapFree(GetProcessHeap(), 0, long_path);
+ HeapFree(GetProcessHeap(), 0, buffer);
+ bret = RemoveDirectoryW(reparse_path);
+ todo_wine ok(bret, "Failed to remove temporary reparse point directory!\n");
+ bret = RemoveDirectoryW(target_path);
+ ok(bret, "Failed to remove temporary target directory!\n");
+ RemoveDirectoryW(path);
}
static void test_set_io_completion_ex(void)
@@ -6193,6 +6316,6 @@ START_TEST(file)
test_ioctl();
test_query_ea();
test_flush_buffers_file();
- test_mailslot_name();
test_reparse_points();
+ test_mailslot_name();
}
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index faef06ae084..a47c3d90df4 100644
index 8d2809ca193..672a1d1fa27 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -36,6 +36,8 @@
@@ -264,7 +72,7 @@ index faef06ae084..a47c3d90df4 100644
#ifdef linux
/* We want the real kernel dirent structure, not the libc one */
@@ -243,6 +252,95 @@ static const BOOL is_case_sensitive = FALSE;
@@ -244,6 +253,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 +168,7 @@ index faef06ae084..a47c3d90df4 100644
/* check if a given Unicode char is OK in a DOS short name */
static inline BOOL is_invalid_dos_char( WCHAR ch )
{
@@ -1641,6 +1739,28 @@ static int parse_samba_dos_attrib_data( char *data, int len )
@@ -1665,6 +1763,28 @@ static int parse_samba_dos_attrib_data( char *data, int len )
}
@@ -389,7 +197,7 @@ index faef06ae084..a47c3d90df4 100644
static BOOL fd_is_mount_point( int fd, const struct stat *st )
{
struct stat parent;
@@ -3441,6 +3561,181 @@ done:
@@ -3528,6 +3648,181 @@ done:
}
@@ -571,7 +379,7 @@ index faef06ae084..a47c3d90df4 100644
/******************************************************************************
* lookup_unix_name
*
@@ -6271,6 +6566,13 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
@@ -6415,6 +6710,13 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
break;
}

View File

@@ -5,55 +5,9 @@ Subject: [PATCH] ntdll: Add support for reading reparse points.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
---
dlls/ntdll/tests/file.c | 21 +++-
dlls/ntdll/unix/file.c | 221 ++++++++++++++++++++++++++++++++++++++--
2 files changed, 231 insertions(+), 11 deletions(-)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 148b6058cee..441bb69adcb 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -5896,14 +5896,14 @@ static void test_reparse_points(void)
static const WCHAR reparseW[] = {'\\','r','e','p','a','r','s','e',0};
static const WCHAR targetW[] = {'\\','t','a','r','g','e','t',0};
static const WCHAR parentW[] = {'\\','.','.','\\',0};
+ INT buffer_len, string_len, path_len, total_len;
static const WCHAR fooW[] = {'f','o','o',0};
static WCHAR volW[] = {'c',':','\\',0};
static const WCHAR dotW[] = {'.',0};
REPARSE_DATA_BUFFER *buffer = NULL;
DWORD dwret, dwLen, dwFlags;
+ WCHAR *dest, *long_path;
UNICODE_STRING nameW;
- WCHAR *long_path;
- INT buffer_len;
HANDLE handle;
BOOL bret;
@@ -6000,6 +6000,23 @@ static void test_reparse_points(void)
buffer_len = build_reparse_buffer(long_path, &buffer);
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());
+
+ /* Read back the junction point */
+ HeapFree(GetProcessHeap(), 0, buffer);
+ buffer_len = sizeof(*buffer) + 2*32767;
+ buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, buffer_len);
+ bret = DeviceIoControl(handle, FSCTL_GET_REPARSE_POINT, NULL, 0, (LPVOID)buffer, buffer_len, &dwret, 0);
+ ok(bret, "Failed to read junction point! (last error=0x%lx)\n", GetLastError());
+ string_len = buffer->MountPointReparseBuffer.SubstituteNameLength;
+ dest = &buffer->MountPointReparseBuffer.PathBuffer[buffer->MountPointReparseBuffer.SubstituteNameOffset/sizeof(WCHAR)];
+ ok((memcmp(dest, long_path, string_len) == 0), "Junction point destination does not match ('%s' != '%s')!\n",
+ wine_dbgstr_w(dest), wine_dbgstr_w(long_path));
+ path_len = buffer->MountPointReparseBuffer.PrintNameOffset/sizeof(WCHAR);
+ path_len += buffer->MountPointReparseBuffer.PrintNameLength/sizeof(WCHAR);
+ total_len = FIELD_OFFSET(typeof(*buffer), MountPointReparseBuffer.PathBuffer[path_len+1])
+ - FIELD_OFFSET(typeof(*buffer), GenericReparseBuffer);
+ ok(buffer->ReparseDataLength == total_len, "ReparseDataLength has unexpected value (%d != %d)\n",
+ buffer->ReparseDataLength, total_len);
CloseHandle(handle);
cleanup:
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 0d58abbfa84..3e160fb1e5c 100644
--- a/dlls/ntdll/unix/file.c

View File

@@ -5,71 +5,9 @@ Subject: [PATCH] ntdll: Add support for deleting reparse points.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
---
dlls/ntdll/tests/file.c | 23 +++++++++-
dlls/ntdll/unix/file.c | 99 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 121 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index b9ec79e37e0..f90509d62a1 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -5388,12 +5388,15 @@ static void test_reparse_points(void)
static const WCHAR targetW[] = {'\\','t','a','r','g','e','t',0};
static const WCHAR parentW[] = {'\\','.','.','\\',0};
INT buffer_len, string_len, path_len, total_len;
+ FILE_BASIC_INFORMATION old_attrib, new_attrib;
static const WCHAR fooW[] = {'f','o','o',0};
static WCHAR volW[] = {'c',':','\\',0};
+ REPARSE_GUID_DATA_BUFFER guid_buffer;
static const WCHAR dotW[] = {'.',0};
REPARSE_DATA_BUFFER *buffer = NULL;
DWORD dwret, dwLen, dwFlags;
WCHAR *dest, *long_path;
+ IO_STATUS_BLOCK iosb;
UNICODE_STRING nameW;
HANDLE handle;
BOOL bret;
@@ -5488,6 +5491,8 @@ static void test_reparse_points(void)
win_skip("Failed to open junction point directory handle (0x%lx).\n", GetLastError());
goto cleanup;
}
+ dwret = NtQueryInformationFile(handle, &iosb, &old_attrib, sizeof(old_attrib), FileBasicInformation);
+ ok(dwret == STATUS_SUCCESS, "Failed to get junction point folder's attributes (0x%lx).\n", dwret);
buffer_len = build_reparse_buffer(long_path, &buffer);
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());
@@ -5508,6 +5513,22 @@ static void test_reparse_points(void)
- FIELD_OFFSET(typeof(*buffer), GenericReparseBuffer);
ok(buffer->ReparseDataLength == total_len, "ReparseDataLength has unexpected value (%d != %d)\n",
buffer->ReparseDataLength, total_len);
+
+ /* Delete the junction point */
+ memset(&old_attrib, 0x00, sizeof(old_attrib));
+ old_attrib.LastAccessTime.QuadPart = 0x200deadcafebeef;
+ dwret = NtSetInformationFile(handle, &iosb, &old_attrib, sizeof(old_attrib), FileBasicInformation);
+ ok(dwret == STATUS_SUCCESS, "Failed to set junction point folder's attributes (0x%lx).\n", dwret);
+ memset(&guid_buffer, 0x00, sizeof(guid_buffer));
+ guid_buffer.ReparseTag = IO_REPARSE_TAG_MOUNT_POINT;
+ bret = DeviceIoControl(handle, FSCTL_DELETE_REPARSE_POINT, (LPVOID)&guid_buffer,
+ REPARSE_GUID_DATA_BUFFER_HEADER_SIZE, NULL, 0, &dwret, 0);
+ ok(bret, "Failed to delete junction point! (0x%lx)\n", GetLastError());
+ memset(&new_attrib, 0x00, sizeof(new_attrib));
+ dwret = NtQueryInformationFile(handle, &iosb, &new_attrib, sizeof(new_attrib), FileBasicInformation);
+ ok(dwret == STATUS_SUCCESS, "Failed to get junction point folder's attributes (0x%lx).\n", dwret);
+ ok(old_attrib.LastAccessTime.QuadPart == new_attrib.LastAccessTime.QuadPart,
+ "Junction point folder's access time does not match.\n");
CloseHandle(handle);
cleanup:
@@ -5516,7 +5537,7 @@ cleanup:
HeapFree(GetProcessHeap(), 0, long_path);
HeapFree(GetProcessHeap(), 0, buffer);
bret = RemoveDirectoryW(reparse_path);
- todo_wine ok(bret, "Failed to remove temporary reparse point directory!\n");
+ ok(bret, "Failed to remove temporary reparse point directory!\n");
bret = RemoveDirectoryW(target_path);
ok(bret, "Failed to remove temporary target directory!\n");
RemoveDirectoryW(path);
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 92ce83b685e..ba77aab61b7 100644
--- a/dlls/ntdll/unix/file.c

View File

@@ -6,26 +6,9 @@ Subject: ntdll: Add support for testing for reparse points with
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
---
dlls/ntdll/tests/file.c | 5 +++++
dlls/ntdll/unix/file.c | 23 +++++++++++++++++++----
2 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index a127a2f4f88..ffc4ca44e32 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -5469,6 +5469,11 @@ static void test_reparse_points(void)
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());
+ /* Check the file attributes of the junction point */
+ dwret = GetFileAttributesW(reparse_path);
+ ok(dwret != (DWORD)~0, "Reparse point doesn't exist (attributes: 0x%lx)!\n", dwret);
+ ok(dwret & FILE_ATTRIBUTE_REPARSE_POINT, "File is not a reparse point! (attributes: 0x%lx)\n", dwret);
+
/* Read back the junction point */
HeapFree(GetProcessHeap(), 0, buffer);
buffer_len = sizeof(*buffer) + 2*32767;
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 4c221f53bfd..948074b35ec 100644
--- a/dlls/ntdll/unix/file.c

View File

@@ -7,7 +7,6 @@ Subject: kernelbase: Add support for deleting reparse points with
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
---
dlls/kernelbase/file.c | 2 +-
dlls/ntdll/tests/file.c | 28 +++++++++++++++++++++++++++-
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
@@ -23,63 +22,6 @@ index bfb291fa925..6214f549406 100644
RtlFreeUnicodeString( &nt_name );
if (!status)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index ffc4ca44e32..f3aad01ee93 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -5363,11 +5363,11 @@ static void test_reparse_points(void)
FILE_BASIC_INFORMATION old_attrib, new_attrib;
static const WCHAR fooW[] = {'f','o','o',0};
static WCHAR volW[] = {'c',':','\\',0};
+ WCHAR *dest, *long_path, *abs_target;
REPARSE_GUID_DATA_BUFFER guid_buffer;
static const WCHAR dotW[] = {'.',0};
REPARSE_DATA_BUFFER *buffer = NULL;
DWORD dwret, dwLen, dwFlags;
- WCHAR *dest, *long_path;
IO_STATUS_BLOCK iosb;
UNICODE_STRING nameW;
HANDLE handle;
@@ -5454,6 +5454,7 @@ static void test_reparse_points(void)
/* use a sane (not obscenely long) target for the rest of testing */
pRtlFreeUnicodeString(&nameW);
pRtlDosPathNameToNtPathName_U(target_path, &nameW, NULL, NULL);
+ abs_target = nameW.Buffer;
/* Create the junction point */
handle = CreateFileW(reparse_path, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING,
@@ -5508,6 +5509,31 @@ static void test_reparse_points(void)
"Junction point folder's access time does not match.\n");
CloseHandle(handle);
+ /* Check deleting a junction point as if it were a directory */
+ HeapFree(GetProcessHeap(), 0, buffer);
+ handle = CreateFileW(reparse_path, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0);
+ buffer_len = build_reparse_buffer(abs_target, &buffer);
+ 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);
+ bret = RemoveDirectoryW(reparse_path);
+ ok(bret, "Failed to delete junction point as directory!\n");
+ dwret = GetFileAttributesW(reparse_path);
+ ok(dwret == (DWORD)~0, "Junction point still exists (attributes: 0x%lx)!\n", dwret);
+
+ /* Check deleting a junction point as if it were a file */
+ HeapFree(GetProcessHeap(), 0, buffer);
+ bret = CreateDirectoryW(reparse_path, NULL);
+ ok(bret, "Failed to create junction point target directory.\n");
+ handle = CreateFileW(reparse_path, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0);
+ buffer_len = build_reparse_buffer(abs_target, &buffer);
+ 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);
+ /* TODO: use DeleteFile on reparse point */
+
cleanup:
/* Cleanup */
pRtlFreeUnicodeString(&nameW);
--
2.17.1

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