From a777ae6b81b918970c4391dda65c884e631927a6 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 4 Oct 2023 07:49:18 +1100 Subject: [PATCH] Rebase against d5b64a1f14b472563c95a02d0062ba592c64e06a. --- ...upport-for-moving-reparse-points-wit.patch | 37 ++++++++++--------- staging/upstream-commit | 2 +- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/patches/ntdll-Junction_Points/0009-kernelbase-Add-support-for-moving-reparse-points-wit.patch b/patches/ntdll-Junction_Points/0009-kernelbase-Add-support-for-moving-reparse-points-wit.patch index 8ca3d39e..290995f4 100644 --- a/patches/ntdll-Junction_Points/0009-kernelbase-Add-support-for-moving-reparse-points-wit.patch +++ b/patches/ntdll-Junction_Points/0009-kernelbase-Add-support-for-moving-reparse-points-wit.patch @@ -1,7 +1,8 @@ -From 70b8fd99f84708447779b45735e0553755f1b8bb Mon Sep 17 00:00:00 2001 +From 762d7992e4a328d9fd94e3960c98951ead0e1a0a Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Sat, 6 Feb 2021 12:46:30 -0700 -Subject: kernelbase: Add support for moving reparse points with MoveFile*. +Subject: [PATCH] kernelbase: Add support for moving reparse points with + MoveFile*. Signed-off-by: Erich E. Hoover --- @@ -12,10 +13,10 @@ Signed-off-by: Erich E. Hoover 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c -index 17c25eb5858..53b9651a8fa 100644 +index abec5367512..d7c3797d4a9 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c -@@ -2471,7 +2471,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH MoveFileWithProgressW( const WCHAR *source, const +@@ -2580,7 +2580,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH MoveFileWithProgressW( const WCHAR *source, const status = NtOpenFile( &source_handle, DELETE | SYNCHRONIZE, &attr, &io, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, @@ -25,10 +26,10 @@ index 17c25eb5858..53b9651a8fa 100644 if (!set_ntstatus( status )) goto error; diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c -index 48abcd338bb..808d863ea55 100644 +index a25b6820291..70b10c56ea0 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c -@@ -5381,7 +5381,8 @@ static INT build_reparse_buffer(const WCHAR *filename, ULONG tag, ULONG flags, +@@ -5666,7 +5666,8 @@ static INT build_reparse_buffer(const WCHAR *filename, ULONG tag, ULONG flags, static void test_reparse_points(void) { @@ -38,7 +39,7 @@ index 48abcd338bb..808d863ea55 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}; -@@ -5752,6 +5753,15 @@ static void test_reparse_points(void) +@@ -6037,6 +6038,15 @@ static void test_reparse_points(void) wine_dbgstr_w(dest), wine_dbgstr_w(rel_target)); CloseHandle(handle); @@ -55,21 +56,21 @@ index 48abcd338bb..808d863ea55 100644 /* Cleanup */ pRtlFreeUnicodeString(&nameW); diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index 948074b35ec..9ae5e194c6d 100644 +index 1b35463e069..d2e57f5a127 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -5328,8 +5328,10 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, - if (len >= sizeof(FILE_RENAME_INFORMATION)) +@@ -5395,8 +5395,10 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, { FILE_RENAME_INFORMATION *info = ptr; + unsigned int flags; + REPARSE_DATA_BUFFER *buffer = NULL; UNICODE_STRING name_str, redir; OBJECT_ATTRIBUTES attr; + ULONG buffer_len = 0; char *unix_name; - name_str.Buffer = info->FileName; -@@ -5338,6 +5340,19 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, + if (class == FileRenameInformation) +@@ -5413,6 +5415,19 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, InitializeObjectAttributes( &attr, &name_str, OBJ_CASE_INSENSITIVE, info->RootDirectory, NULL ); get_redirect( &attr, &redir ); @@ -89,7 +90,7 @@ index 948074b35ec..9ae5e194c6d 100644 status = nt_to_unix_file_name( &attr, &unix_name, FILE_OPEN_IF ); if (status == STATUS_SUCCESS || status == STATUS_NO_SUCH_FILE) { -@@ -5354,9 +5369,14 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, +@@ -5429,9 +5444,14 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, } SERVER_END_REQ; @@ -105,10 +106,10 @@ index 948074b35ec..9ae5e194c6d 100644 else status = STATUS_INVALID_PARAMETER_3; break; diff --git a/server/fd.c b/server/fd.c -index 1ed975673a6..60ba552f769 100644 +index b0cbf28d543..5f1b4ac3114 100644 --- a/server/fd.c +++ b/server/fd.c -@@ -2704,7 +2704,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da +@@ -2695,7 +2695,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da goto failed; } @@ -117,7 +118,7 @@ index 1ed975673a6..60ba552f769 100644 { if (!fstat( fd->unix_fd, &st2 ) && st.st_ino == st2.st_ino && st.st_dev == st2.st_dev) { -@@ -2720,7 +2720,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da +@@ -2711,7 +2711,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da } /* can't replace directories or special files */ @@ -126,7 +127,7 @@ index 1ed975673a6..60ba552f769 100644 { set_error( STATUS_ACCESS_DENIED ); goto failed; -@@ -2778,6 +2778,8 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da +@@ -2769,6 +2769,8 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da fd->nt_name = dup_nt_name( root, nt_name, &fd->nt_namelen ); free( fd->unix_name ); fd->closed->unix_name = fd->unix_name = realpath( name, NULL ); @@ -136,5 +137,5 @@ index 1ed975673a6..60ba552f769 100644 if (!fd->unix_name) set_error( STATUS_NO_MEMORY ); -- -2.17.1 +2.42.0 diff --git a/staging/upstream-commit b/staging/upstream-commit index b52ee6a7..afe64d21 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -209b2c23c5e302ed9211d67ab044386d3fe0bef4 +d5b64a1f14b472563c95a02d0062ba592c64e06a