Rebase against 9617c784b9d7ffa88182c24aa2f110a6867aa67d.

This commit is contained in:
Alistair Leslie-Hughes 2023-07-07 14:27:32 +10:00
parent abbfbb8e15
commit a45cfa1ee2
2 changed files with 8 additions and 22 deletions

View File

@ -1,7 +1,7 @@
From 7413100037edc5d6a0dbd5107cbe083b11a7ca55 Mon Sep 17 00:00:00 2001
From c491128fb95c0aaf54cc917061d46910b7bd2e4a Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Sun, 4 Sep 2022 13:19:16 -0600
Subject: ntdll: Allow reparse points to target the applicable Unix
Subject: [PATCH] ntdll: Allow reparse points to target the applicable Unix
file/directory.
Allows lookup_unix_name 'shortcut' to succeed, as well as allowing
@ -10,14 +10,13 @@ the user to follow the symlink outside of Wine.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
---
dlls/ntdll/unix/file.c | 129 +++++++++++++++++++++++++++++++++++++++++
include/winnt.h | 2 +
2 files changed, 131 insertions(+)
1 file changed, 129 insertions(+)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index ba844e90272..980251b8bbf 100644
index 71311bec9c9..28aa839b34a 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -3545,6 +3545,125 @@ static NTSTATUS get_reparse_target( UNICODE_STRING *nt_target, REPARSE_DATA_BUFF
@@ -3581,6 +3581,125 @@ static NTSTATUS get_reparse_target( UNICODE_STRING *nt_target, REPARSE_DATA_BUFF
}
@ -143,7 +142,7 @@ index ba844e90272..980251b8bbf 100644
/*
* Retrieve the unix name corresponding to a file handle, remove that directory, and then symlink
* the requested directory to the location of the old directory.
@@ -3678,6 +3797,16 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
@@ -3714,6 +3833,16 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
link_dir_fd = fd;
}
@ -160,19 +159,6 @@ index ba844e90272..980251b8bbf 100644
/* Atomically move the initial link into position */
if (!renameat2( -1, tmplink, -1, unix_src, RENAME_EXCHANGE ))
{
diff --git a/include/winnt.h b/include/winnt.h
index 836bd7123e5..19bb5be83c4 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -2330,6 +2330,8 @@ extern struct _TEB * WINAPI NtCurrentTeb(void);
#define IO_REPARSE_TAG_ONEDRIVE __MSABI_LONG(0x80000021)
#define IO_REPARSE_TAG_GVFS_TOMBSTONE __MSABI_LONG(0xA0000022)
+#define IsReparseTagNameSurrogate(x) (((x) & (1<<29)) == (1<<29))
+
/*
* File formats definitions
*/
--
2.17.1
2.40.1

View File

@ -1 +1 @@
f4a8ad89d43646a8d109da5747dfb1a92a6d8cd1
9617c784b9d7ffa88182c24aa2f110a6867aa67d