Rebase against 19441ac8046556a0118d6b59838dfd408fa56fdd.

This commit is contained in:
Alistair Leslie-Hughes
2025-06-13 07:55:01 +10:00
parent cc517dd949
commit 52ba925f90
3 changed files with 19 additions and 21 deletions

View File

@@ -1,7 +1,7 @@
From a34c3f550b16e84f907c637514f0645456420d65 Mon Sep 17 00:00:00 2001
From 00991099552d2c3e24ef04d379755bdea2a80941 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Sat, 6 Feb 2021 12:46:30 -0700
Subject: [PATCH] kernelbase: Add support for moving reparse points with
Subject: [PATCH 1/1] kernelbase: Add support for moving reparse points with
MoveFile*.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
@@ -13,10 +13,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
4 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
index b7d16410d75..dccae6cb565 100644
index 266d59ef58d..d1fcf22f0d9 100644
--- a/dlls/kernelbase/file.c
+++ b/dlls/kernelbase/file.c
@@ -2514,7 +2514,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH MoveFileWithProgressW( const WCHAR *source, const
@@ -2535,7 +2535,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH MoveFileWithProgressW( const WCHAR *source, const
InitializeObjectAttributes( &attr, &nt_name, OBJ_CASE_INSENSITIVE, 0, NULL );
status = NtOpenFile( &source_handle, DELETE | SYNCHRONIZE, &attr, &io,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
@@ -26,10 +26,10 @@ index b7d16410d75..dccae6cb565 100644
if (!set_ntstatus( status )) goto error;
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 8b561e162e8..7b6e2776947 100644
index 8d4de8ae29a..ddc0e024b2e 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -6021,7 +6021,8 @@ static INT build_reparse_buffer(const WCHAR *filename, ULONG tag, ULONG flags,
@@ -6025,7 +6025,8 @@ static INT build_reparse_buffer(const WCHAR *filename, ULONG tag, ULONG flags,
static void test_reparse_points(void)
{
@@ -39,7 +39,7 @@ index 8b561e162e8..7b6e2776947 100644
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};
@@ -6392,6 +6393,15 @@ static void test_reparse_points(void)
@@ -6396,6 +6397,15 @@ static void test_reparse_points(void)
wine_dbgstr_w(dest), wine_dbgstr_w(rel_target));
CloseHandle(handle);
@@ -56,21 +56,19 @@ index 8b561e162e8..7b6e2776947 100644
/* Cleanup */
pRtlFreeUnicodeString(&nameW);
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index d3045c6c936..49afb57b2b6 100644
index 681a9cf4c6f..7f8974c9b04 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -5556,8 +5556,10 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
{
FILE_RENAME_INFORMATION *info = ptr;
@@ -5581,6 +5581,8 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
unsigned int flags;
+ REPARSE_DATA_BUFFER *buffer = NULL;
UNICODE_STRING name_str, redir;
OBJECT_ATTRIBUTES attr;
+ REPARSE_DATA_BUFFER *buffer = NULL;
+ ULONG buffer_len = 0;
char *unix_name;
if (class == FileRenameInformation)
@@ -5574,6 +5576,19 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
if (class == FileLinkInformation)
@@ -5597,6 +5599,19 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
InitializeObjectAttributes( &attr, &name_str, OBJ_CASE_INSENSITIVE, info->RootDirectory, NULL );
get_redirect( &attr, &redir );
@@ -90,7 +88,7 @@ index d3045c6c936..49afb57b2b6 100644
status = nt_to_unix_file_name( &attr, &unix_name, FILE_OPEN_IF );
if (status == STATUS_SUCCESS || status == STATUS_NO_SUCH_FILE)
{
@@ -5590,9 +5605,14 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
@@ -5613,9 +5628,14 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
}
SERVER_END_REQ;