Rebase against 69e3a51b3dc50dd1697c64f7b2bcde54baa0a300.

This commit is contained in:
Alistair Leslie-Hughes
2025-06-25 10:56:05 +10:00
parent 5054f7359b
commit 2ed03c4ed0
2 changed files with 20 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
From 3a20b65362185b01069e04d84201da0ac6fa61cd Mon Sep 17 00:00:00 2001
From fea1d301c573d3410e2f7d66b21609663ee47880 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
@@ -8,15 +8,15 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
---
dlls/kernelbase/file.c | 2 +-
dlls/ntdll/tests/file.c | 12 +++++++++++-
dlls/ntdll/unix/file.c | 21 +++++++++++++++++++++
dlls/ntdll/unix/file.c | 23 ++++++++++++++++++++++-
server/fd.c | 6 ++++--
4 files changed, 37 insertions(+), 4 deletions(-)
4 files changed, 38 insertions(+), 5 deletions(-)
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
index 266d59ef58d..d1fcf22f0d9 100644
index 51459402e75..d70e0fc833c 100644
--- a/dlls/kernelbase/file.c
+++ b/dlls/kernelbase/file.c
@@ -2535,7 +2535,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH MoveFileWithProgressW( const WCHAR *source, const
@@ -2538,7 +2538,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,7 +26,7 @@ index 266d59ef58d..d1fcf22f0d9 100644
if (!set_ntstatus( status )) goto error;
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 8d4de8ae29a..ddc0e024b2e 100644
index b592036d2d0..6e2c7906644 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -6025,7 +6025,8 @@ static INT build_reparse_buffer(const WCHAR *filename, ULONG tag, ULONG flags,
@@ -56,10 +56,10 @@ index 8d4de8ae29a..ddc0e024b2e 100644
/* Cleanup */
pRtlFreeUnicodeString(&nameW);
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 0af1c40f7e4..f3274478ae2 100644
index 8e9e28269f8..6385a26bee7 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -5688,6 +5688,8 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
@@ -5675,6 +5675,8 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
unsigned int flags;
UNICODE_STRING name_str, nt_name;
OBJECT_ATTRIBUTES attr;
@@ -67,8 +67,8 @@ index 0af1c40f7e4..f3274478ae2 100644
+ ULONG buffer_len = 0;
char *unix_name;
if (class == FileLinkInformation)
@@ -5702,6 +5704,20 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
if (class == FileRenameInformation)
@@ -5689,6 +5691,20 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
name_str.Length = info->FileNameLength;
name_str.MaximumLength = info->FileNameLength + sizeof(WCHAR);
InitializeObjectAttributes( &attr, &name_str, OBJ_CASE_INSENSITIVE, info->RootDirectory, NULL );
@@ -89,7 +89,7 @@ index 0af1c40f7e4..f3274478ae2 100644
status = get_nt_and_unix_names( &attr, &nt_name, &unix_name, FILE_OPEN_IF );
if (status == STATUS_SUCCESS || status == STATUS_NO_SUCH_FILE)
{
@@ -5718,6 +5734,11 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
@@ -5705,8 +5721,13 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
}
SERVER_END_REQ;
@@ -99,13 +99,16 @@ index 0af1c40f7e4..f3274478ae2 100644
+
+ free( unix_name );
}
free( unix_name );
- free( unix_name );
+ free( buffer );
free( nt_name.Buffer );
}
else status = STATUS_INVALID_PARAMETER_3;
diff --git a/server/fd.c b/server/fd.c
index b5ccf5d5e9d..b755e406c13 100644
index 466259ae567..7f88fcd6e33 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -2740,7 +2740,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
@@ -2771,7 +2771,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
goto failed;
}
@@ -114,7 +117,7 @@ index b5ccf5d5e9d..b755e406c13 100644
{
if (!fstat( fd->unix_fd, &st2 ) && st.st_ino == st2.st_ino && st.st_dev == st2.st_dev)
{
@@ -2756,7 +2756,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
@@ -2787,7 +2787,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
}
/* can't replace directories or special files */
@@ -123,7 +126,7 @@ index b5ccf5d5e9d..b755e406c13 100644
{
set_error( STATUS_ACCESS_DENIED );
goto failed;
@@ -2822,6 +2822,8 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
@@ -2853,6 +2853,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 );

View File

@@ -1 +1 @@
7f0fac46d718e0961314d0c50342dcf336b9803d
69e3a51b3dc50dd1697c64f7b2bcde54baa0a300