mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
ntdll-Junction_Points: Updates from Erich E. Hoover.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50770 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51438
This commit is contained in:
parent
f7c80250ec
commit
c91c63a5da
@ -1,4 +1,4 @@
|
||||
From 1370cc026e08ebc0f9eb0314b86cc38220c22041 Mon Sep 17 00:00:00 2001
|
||||
From deebd97b531b74f34fd30ab5ef699812c5be1fe1 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 junction point creation.
|
||||
@ -14,10 +14,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
create mode 100644 include/ntifs.h
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 596809f9f6a..e9a7c2d6088 100644
|
||||
index 24bcc7448d2..f80fbd737ef 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2209,6 +2209,8 @@ AC_CHECK_FUNCS(\
|
||||
@@ -2215,6 +2215,8 @@ AC_CHECK_FUNCS(\
|
||||
proc_pidinfo \
|
||||
pwrite \
|
||||
readlink \
|
||||
@ -152,7 +152,7 @@ index 46037546e6e..7a01e947e13 100644
|
||||
test_mailslot_name();
|
||||
}
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 94140d1cfbc..3699934caf8 100644
|
||||
index 4e18e229b1a..f6c23f629b8 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -36,6 +36,7 @@
|
||||
@ -215,7 +215,7 @@ index 94140d1cfbc..3699934caf8 100644
|
||||
/* get space from the current directory data buffer, allocating a new one if necessary */
|
||||
static void *get_dir_data_space( struct dir_data *data, unsigned int size )
|
||||
{
|
||||
@@ -5931,6 +5963,116 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer,
|
||||
@@ -5942,6 +5974,116 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer,
|
||||
}
|
||||
|
||||
|
||||
@ -332,7 +332,7 @@ index 94140d1cfbc..3699934caf8 100644
|
||||
/******************************************************************************
|
||||
* NtFsControlFile (NTDLL.@)
|
||||
*/
|
||||
@@ -6013,6 +6155,23 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
@@ -6024,6 +6166,23 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
break;
|
||||
}
|
||||
|
||||
@ -357,10 +357,10 @@ index 94140d1cfbc..3699934caf8 100644
|
||||
TRACE("FSCTL_SET_SPARSE: Ignoring request\n");
|
||||
io->Information = 0;
|
||||
diff --git a/include/Makefile.in b/include/Makefile.in
|
||||
index 61a74a210c9..e4a3a83ecc8 100644
|
||||
index 9b397ffa183..ee440a07a94 100644
|
||||
--- a/include/Makefile.in
|
||||
+++ b/include/Makefile.in
|
||||
@@ -541,6 +541,7 @@ SOURCES = \
|
||||
@@ -543,6 +543,7 @@ SOURCES = \
|
||||
ntdef.h \
|
||||
ntdsapi.h \
|
||||
ntgdi.h \
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 49ed938003d970383e684d7db56bf570d0d94b2a Mon Sep 17 00:00:00 2001
|
||||
From cfcae7fcb7243890a6b5c7f3397313ca894b19be Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 16 Jan 2014 20:57:57 -0700
|
||||
Subject: [PATCH] ntdll: Add support for reading junction points.
|
||||
@ -10,10 +10,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
2 files changed, 144 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 54e06a3f126..a3f3485ce46 100644
|
||||
index 7a01e947e13..3b7746650f3 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5265,14 +5265,15 @@ static void test_reparse_points(void)
|
||||
@@ -5354,14 +5354,15 @@ static void test_reparse_points(void)
|
||||
static const WCHAR reparseW[] = {'\\','r','e','p','a','r','s','e',0};
|
||||
WCHAR path[MAX_PATH], reparse_path[MAX_PATH], target_path[MAX_PATH];
|
||||
static const WCHAR targetW[] = {'\\','t','a','r','g','e','t',0};
|
||||
@ -30,7 +30,7 @@ index 54e06a3f126..a3f3485ce46 100644
|
||||
BOOL bret;
|
||||
|
||||
/* Create a temporary folder for the junction point tests */
|
||||
@@ -5320,6 +5321,23 @@ static void test_reparse_points(void)
|
||||
@@ -5409,6 +5410,23 @@ static void test_reparse_points(void)
|
||||
buffer_len = build_reparse_buffer(nameW.Buffer, &buffer);
|
||||
bret = DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
|
||||
ok(bret, "Failed to create junction point! (0x%x)\n", GetLastError());
|
||||
@ -55,10 +55,10 @@ index 54e06a3f126..a3f3485ce46 100644
|
||||
|
||||
cleanup:
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 492838d9031..5289c0eec71 100644
|
||||
index f6c23f629b8..c6c4df8dba3 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -6092,6 +6092,125 @@ cleanup:
|
||||
@@ -6084,6 +6084,125 @@ cleanup:
|
||||
}
|
||||
|
||||
|
||||
@ -184,7 +184,7 @@ index 492838d9031..5289c0eec71 100644
|
||||
/******************************************************************************
|
||||
* NtFsControlFile (NTDLL.@)
|
||||
*/
|
||||
@@ -6174,6 +6293,12 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
@@ -6166,6 +6285,12 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From cc1a2a1ade9c176a7c77a5673c26cee6ab85963c Mon Sep 17 00:00:00 2001
|
||||
From 882f91cd59e014e985c58fc36f6dc2b2a5679bf8 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 16 Jan 2014 21:00:21 -0700
|
||||
Subject: [PATCH] ntdll: Add support for deleting junction points.
|
||||
@ -11,10 +11,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
3 files changed, 131 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index a3f3485ce46..b844fe9e1d3 100644
|
||||
index 3b7746650f3..0031f49693c 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5266,11 +5266,14 @@ static void test_reparse_points(void)
|
||||
@@ -5355,11 +5355,14 @@ static void test_reparse_points(void)
|
||||
WCHAR path[MAX_PATH], reparse_path[MAX_PATH], target_path[MAX_PATH];
|
||||
static const WCHAR targetW[] = {'\\','t','a','r','g','e','t',0};
|
||||
INT buffer_len, string_len, path_len, total_len;
|
||||
@ -29,7 +29,7 @@ index a3f3485ce46..b844fe9e1d3 100644
|
||||
UNICODE_STRING nameW;
|
||||
HANDLE handle;
|
||||
WCHAR *dest;
|
||||
@@ -5318,6 +5321,8 @@ static void test_reparse_points(void)
|
||||
@@ -5407,6 +5410,8 @@ static void test_reparse_points(void)
|
||||
win_skip("Failed to open junction point directory handle (0x%x).\n", GetLastError());
|
||||
goto cleanup;
|
||||
}
|
||||
@ -38,7 +38,7 @@ index a3f3485ce46..b844fe9e1d3 100644
|
||||
buffer_len = build_reparse_buffer(nameW.Buffer, &buffer);
|
||||
bret = DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
|
||||
ok(bret, "Failed to create junction point! (0x%x)\n", GetLastError());
|
||||
@@ -5338,6 +5343,22 @@ static void test_reparse_points(void)
|
||||
@@ -5427,6 +5432,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);
|
||||
@ -61,7 +61,7 @@ index a3f3485ce46..b844fe9e1d3 100644
|
||||
CloseHandle(handle);
|
||||
|
||||
cleanup:
|
||||
@@ -5345,7 +5366,7 @@ cleanup:
|
||||
@@ -5434,7 +5455,7 @@ cleanup:
|
||||
pRtlFreeUnicodeString(&nameW);
|
||||
HeapFree(GetProcessHeap(), 0, buffer);
|
||||
bret = RemoveDirectoryW(reparse_path);
|
||||
@ -71,10 +71,10 @@ index a3f3485ce46..b844fe9e1d3 100644
|
||||
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 5289c0eec71..118f81db3c1 100644
|
||||
index c6c4df8dba3..c6cdf54a061 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -6211,6 +6211,87 @@ cleanup:
|
||||
@@ -6203,6 +6203,87 @@ cleanup:
|
||||
}
|
||||
|
||||
|
||||
@ -162,7 +162,7 @@ index 5289c0eec71..118f81db3c1 100644
|
||||
/******************************************************************************
|
||||
* NtFsControlFile (NTDLL.@)
|
||||
*/
|
||||
@@ -6293,6 +6374,22 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
@@ -6285,6 +6366,22 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2b0a539941dcd1a292cda3f506abb6359f409527 Mon Sep 17 00:00:00 2001
|
||||
From 233e652467335f4d618de1a68d7f39ac0c9bbcfd Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 16 Jan 2014 21:01:25 -0700
|
||||
Subject: [PATCH] ntdll: Add a test for junction point advertisement.
|
||||
@ -9,10 +9,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index b844fe9e1d3..504d67adde6 100644
|
||||
index 0031f49693c..521857575d8 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5327,6 +5327,11 @@ static void test_reparse_points(void)
|
||||
@@ -5416,6 +5416,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%x)\n", GetLastError());
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d5a062699b1a599fc87ba757e65b3aeb2ead9834 Mon Sep 17 00:00:00 2001
|
||||
From 65dd6d4aa01884b7119cca1defe31b23c248f719 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 16 Jan 2014 21:02:11 -0700
|
||||
Subject: [PATCH] server: Add support for deleting junction points with
|
||||
@ -7,14 +7,14 @@ Subject: [PATCH] server: Add support for deleting junction points with
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
dlls/ntdll/tests/file.c | 34 +++++++++++++++++++++++++++++++++-
|
||||
server/fd.c | 36 +++++++++++++++++++++++++++---------
|
||||
2 files changed, 60 insertions(+), 10 deletions(-)
|
||||
server/fd.c | 37 ++++++++++++++++++++++++++++---------
|
||||
2 files changed, 61 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 504d67adde6..2ddabc865bf 100644
|
||||
index 521857575d8..c5b3b83802e 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5272,7 +5272,7 @@ static void test_reparse_points(void)
|
||||
@@ -5361,7 +5361,7 @@ static void test_reparse_points(void)
|
||||
REPARSE_GUID_DATA_BUFFER guid_buffer;
|
||||
static const WCHAR dotW[] = {'.',0};
|
||||
REPARSE_DATA_BUFFER *buffer = NULL;
|
||||
@ -23,7 +23,7 @@ index 504d67adde6..2ddabc865bf 100644
|
||||
IO_STATUS_BLOCK iosb;
|
||||
UNICODE_STRING nameW;
|
||||
HANDLE handle;
|
||||
@@ -5366,6 +5366,38 @@ static void test_reparse_points(void)
|
||||
@@ -5455,6 +5455,38 @@ static void test_reparse_points(void)
|
||||
"Junction point folder's access time does not match.\n");
|
||||
CloseHandle(handle);
|
||||
|
||||
@ -63,7 +63,7 @@ index 504d67adde6..2ddabc865bf 100644
|
||||
/* Cleanup */
|
||||
pRtlFreeUnicodeString(&nameW);
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index 481e9a88f0f..2605adf96ff 100644
|
||||
index b953da2ab85..2adadceae25 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -169,7 +169,8 @@ struct closed_fd
|
||||
@ -84,7 +84,7 @@ index 481e9a88f0f..2605adf96ff 100644
|
||||
char *unix_name; /* unix file name */
|
||||
WCHAR *nt_name; /* NT file name */
|
||||
data_size_t nt_namelen; /* length of NT file name */
|
||||
@@ -1121,6 +1123,7 @@ static void inode_close_pending( struct inode *inode, int keep_unlinks )
|
||||
@@ -1118,6 +1120,7 @@ static void inode_close_pending( struct inode *inode, int keep_unlinks )
|
||||
if (!keep_unlinks || !fd->unlink) /* get rid of it unless there's an unlink pending on that file */
|
||||
{
|
||||
list_remove( ptr );
|
||||
@ -92,7 +92,7 @@ index 481e9a88f0f..2605adf96ff 100644
|
||||
free( fd->unix_name );
|
||||
free( fd );
|
||||
}
|
||||
@@ -1155,12 +1158,13 @@ static void inode_destroy( struct object *obj )
|
||||
@@ -1152,12 +1155,13 @@ static void inode_destroy( struct object *obj )
|
||||
{
|
||||
/* make sure it is still the same file */
|
||||
struct stat st;
|
||||
@ -109,7 +109,7 @@ index 481e9a88f0f..2605adf96ff 100644
|
||||
free( fd->unix_name );
|
||||
free( fd );
|
||||
}
|
||||
@@ -1581,6 +1585,7 @@ static void fd_destroy( struct object *obj )
|
||||
@@ -1578,6 +1582,7 @@ static void fd_destroy( struct object *obj )
|
||||
else /* no inode, close it right away */
|
||||
{
|
||||
if (fd->unix_fd != -1) close( fd->unix_fd );
|
||||
@ -117,7 +117,7 @@ index 481e9a88f0f..2605adf96ff 100644
|
||||
free( fd->unix_name );
|
||||
}
|
||||
}
|
||||
@@ -1690,6 +1695,7 @@ static struct fd *alloc_fd_object(void)
|
||||
@@ -1687,6 +1692,7 @@ static struct fd *alloc_fd_object(void)
|
||||
fd->options = 0;
|
||||
fd->sharing = 0;
|
||||
fd->unix_fd = -1;
|
||||
@ -125,7 +125,7 @@ index 481e9a88f0f..2605adf96ff 100644
|
||||
fd->unix_name = NULL;
|
||||
fd->nt_name = NULL;
|
||||
fd->nt_namelen = 0;
|
||||
@@ -1727,6 +1733,7 @@ struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *use
|
||||
@@ -1724,6 +1730,7 @@ struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *use
|
||||
fd->access = 0;
|
||||
fd->options = options;
|
||||
fd->sharing = 0;
|
||||
@ -133,7 +133,7 @@ index 481e9a88f0f..2605adf96ff 100644
|
||||
fd->unix_name = NULL;
|
||||
fd->nt_name = NULL;
|
||||
fd->nt_namelen = 0;
|
||||
@@ -1768,6 +1775,12 @@ struct fd *dup_fd_object( struct fd *orig, unsigned int access, unsigned int sha
|
||||
@@ -1765,6 +1772,12 @@ struct fd *dup_fd_object( struct fd *orig, unsigned int access, unsigned int sha
|
||||
fd->nt_namelen = orig->nt_namelen;
|
||||
}
|
||||
|
||||
@ -146,7 +146,7 @@ index 481e9a88f0f..2605adf96ff 100644
|
||||
if (orig->inode)
|
||||
{
|
||||
struct closed_fd *closed = mem_alloc( sizeof(*closed) );
|
||||
@@ -1780,6 +1793,7 @@ struct fd *dup_fd_object( struct fd *orig, unsigned int access, unsigned int sha
|
||||
@@ -1777,6 +1790,7 @@ struct fd *dup_fd_object( struct fd *orig, unsigned int access, unsigned int sha
|
||||
}
|
||||
closed->unix_fd = fd->unix_fd;
|
||||
closed->unlink = 0;
|
||||
@ -154,7 +154,7 @@ index 481e9a88f0f..2605adf96ff 100644
|
||||
closed->unix_name = fd->unix_name;
|
||||
fd->closed = closed;
|
||||
fd->inode = (struct inode *)grab_object( orig->inode );
|
||||
@@ -1964,18 +1978,19 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -1961,18 +1975,19 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
fd->unix_name = NULL;
|
||||
if ((path = dup_fd_name( root, name )))
|
||||
{
|
||||
@ -177,7 +177,7 @@ index 481e9a88f0f..2605adf96ff 100644
|
||||
{
|
||||
unsigned int err;
|
||||
struct inode *inode = get_inode( st.st_dev, st.st_ino, fd->unix_fd );
|
||||
@@ -1993,6 +2008,9 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -1990,6 +2005,9 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
list_add_head( &inode->open, &fd->inode_entry );
|
||||
closed_fd = NULL;
|
||||
|
||||
@ -187,12 +187,13 @@ index 481e9a88f0f..2605adf96ff 100644
|
||||
/* check directory options */
|
||||
if ((options & FILE_DIRECTORY_FILE) && !S_ISDIR(st.st_mode))
|
||||
{
|
||||
@@ -2605,10 +2623,10 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
|
||||
@@ -2619,10 +2637,11 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
|
||||
|
||||
free( fd->nt_name );
|
||||
fd->nt_name = dup_nt_name( root, nt_name, &fd->nt_namelen );
|
||||
+ free( fd->unlink_name );
|
||||
free( fd->unix_name );
|
||||
+ fd->closed->unlink_name = fd->unlink_name = name;
|
||||
fd->closed->unix_name = fd->unix_name = realpath( name, NULL );
|
||||
- free( name );
|
||||
- if (!fd->unix_name)
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 58c9e69484d7c8da358e61de61827ec1d8399bbd Mon Sep 17 00:00:00 2001
|
||||
From 0066234ca48eee5b847de57d552966b8fbb14f95 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Sat, 12 Dec 2020 17:28:31 -0700
|
||||
Subject: [PATCH] kernel32: Advertise junction point support.
|
||||
@ -114,10 +114,10 @@ index 04e8fe3c0f5..c8e7d6bf088 100644
|
||||
info->FileSystemNameLength = min( sizeof(ntfsW), length - offsetof( FILE_FS_ATTRIBUTE_INFORMATION, FileSystemName ) );
|
||||
memcpy(info->FileSystemName, ntfsW, info->FileSystemNameLength);
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 2ddabc865bf..699d5e67d88 100644
|
||||
index c5b3b83802e..084398ba83d 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5262,8 +5262,8 @@ static INT build_reparse_buffer(const WCHAR *filename, REPARSE_DATA_BUFFER **pbu
|
||||
@@ -5351,8 +5351,8 @@ static INT build_reparse_buffer(const WCHAR *filename, REPARSE_DATA_BUFFER **pbu
|
||||
|
||||
static void test_reparse_points(void)
|
||||
{
|
||||
@ -127,7 +127,7 @@ index 2ddabc865bf..699d5e67d88 100644
|
||||
static const WCHAR targetW[] = {'\\','t','a','r','g','e','t',0};
|
||||
INT buffer_len, string_len, path_len, total_len;
|
||||
FILE_BASIC_INFORMATION old_attrib, new_attrib;
|
||||
@@ -5292,7 +5292,12 @@ static void test_reparse_points(void)
|
||||
@@ -5381,7 +5381,12 @@ static void test_reparse_points(void)
|
||||
pRtlDosPathNameToNtPathName_U(path, &nameW, NULL, NULL);
|
||||
volW[0] = nameW.Buffer[4];
|
||||
pRtlFreeUnicodeString( &nameW );
|
||||
|
@ -1,4 +1,4 @@
|
||||
From fb7afe57f143a7777f54c1e936d60af5ace51865 Mon Sep 17 00:00:00 2001
|
||||
From 4f24462df45c573934d5507fd5ec0a3cbe8c7bdd Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 16 Jan 2014 21:06:24 -0700
|
||||
Subject: [PATCH] ntdll: Add support for absolute symlink creation.
|
||||
@ -11,10 +11,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
3 files changed, 146 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 699d5e67d88..e0fa36ea64f 100644
|
||||
index 084398ba83d..81cc2ab5dab 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5234,26 +5234,50 @@ static void test_mailslot_name(void)
|
||||
@@ -5323,26 +5323,50 @@ static void test_mailslot_name(void)
|
||||
CloseHandle( device );
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ index 699d5e67d88..e0fa36ea64f 100644
|
||||
lstrcpyW(subst_dest, filename);
|
||||
lstrcpyW(print_dest, &filename[prefix_len]);
|
||||
*pbuffer = buffer;
|
||||
@@ -5273,10 +5297,12 @@ static void test_reparse_points(void)
|
||||
@@ -5362,10 +5386,12 @@ static void test_reparse_points(void)
|
||||
static const WCHAR dotW[] = {'.',0};
|
||||
REPARSE_DATA_BUFFER *buffer = NULL;
|
||||
DWORD dwret, dwLen, dwFlags, err;
|
||||
@ -87,7 +87,7 @@ index 699d5e67d88..e0fa36ea64f 100644
|
||||
BOOL bret;
|
||||
|
||||
/* Create a temporary folder for the junction point tests */
|
||||
@@ -5328,7 +5354,7 @@ static void test_reparse_points(void)
|
||||
@@ -5417,7 +5443,7 @@ static void test_reparse_points(void)
|
||||
}
|
||||
dwret = NtQueryInformationFile(handle, &iosb, &old_attrib, sizeof(old_attrib), FileBasicInformation);
|
||||
ok(dwret == STATUS_SUCCESS, "Failed to get junction point folder's attributes (0x%x).\n", dwret);
|
||||
@ -96,7 +96,7 @@ index 699d5e67d88..e0fa36ea64f 100644
|
||||
bret = DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
|
||||
ok(bret, "Failed to create junction point! (0x%x)\n", GetLastError());
|
||||
|
||||
@@ -5375,7 +5401,7 @@ static void test_reparse_points(void)
|
||||
@@ -5464,7 +5490,7 @@ static void test_reparse_points(void)
|
||||
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);
|
||||
@ -105,7 +105,7 @@ index 699d5e67d88..e0fa36ea64f 100644
|
||||
bret = DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
|
||||
ok(bret, "Failed to create junction point! (0x%x)\n", GetLastError());
|
||||
CloseHandle(handle);
|
||||
@@ -5390,7 +5416,7 @@ static void test_reparse_points(void)
|
||||
@@ -5479,7 +5505,7 @@ static void test_reparse_points(void)
|
||||
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);
|
||||
@ -114,7 +114,7 @@ index 699d5e67d88..e0fa36ea64f 100644
|
||||
bret = DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
|
||||
ok(bret, "Failed to create junction point! (0x%x)\n", GetLastError());
|
||||
CloseHandle(handle);
|
||||
@@ -5403,14 +5429,73 @@ static void test_reparse_points(void)
|
||||
@@ -5492,14 +5518,73 @@ static void test_reparse_points(void)
|
||||
ok(dwret != (DWORD)~0, "Junction point doesn't exist (attributes: 0x%x)!\n", dwret);
|
||||
ok(dwret & FILE_ATTRIBUTE_REPARSE_POINT, "File is not a junction point! (attributes: 0x%x)\n", dwret);
|
||||
|
||||
@ -193,10 +193,10 @@ index 699d5e67d88..e0fa36ea64f 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 118f81db3c1..da5136db68c 100644
|
||||
index c6cdf54a061..d9e0388af2d 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -5989,18 +5989,35 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer,
|
||||
@@ -5981,18 +5981,35 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer,
|
||||
NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
{
|
||||
BOOL src_allocated = FALSE, dest_allocated = FALSE, tempdir_created = FALSE;
|
||||
@ -235,7 +235,7 @@ index 118f81db3c1..da5136db68c 100644
|
||||
if ((status = server_get_unix_fd( handle, FILE_SPECIAL_ACCESS, &dest_fd, &needs_close, NULL, NULL )))
|
||||
return status;
|
||||
|
||||
@@ -6035,6 +6052,20 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6027,6 +6044,20 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
strcat( magic_dest, "." );
|
||||
strcat( magic_dest, "/" );
|
||||
}
|
||||
@ -256,7 +256,7 @@ index 118f81db3c1..da5136db68c 100644
|
||||
strcat( magic_dest, unix_dest );
|
||||
|
||||
/* Produce the link in a temporary location in the same folder */
|
||||
@@ -6399,17 +6430,7 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
@@ -6391,17 +6422,7 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
case FSCTL_SET_REPARSE_POINT:
|
||||
{
|
||||
REPARSE_DATA_BUFFER *buffer = (REPARSE_DATA_BUFFER *)in_buffer;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5859da2b48592d1a13f471a6932a2529aa1e0395 Mon Sep 17 00:00:00 2001
|
||||
From febfe0aa6ee03bdcd4be96998f623648fe30e4e2 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 13 Mar 2019 12:55:20 -0600
|
||||
Subject: [PATCH] ntdll: Add support for reading absolute symlinks.
|
||||
@ -10,10 +10,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
2 files changed, 44 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index e0fa36ea64f..cfc0d176b53 100644
|
||||
index 81cc2ab5dab..bf9d9677412 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5480,7 +5480,6 @@ static void test_reparse_points(void)
|
||||
@@ -5569,7 +5569,6 @@ static void test_reparse_points(void)
|
||||
ok(dwret == STATUS_SUCCESS, "Failed to get symlink folder's attributes (0x%x).\n", dwret);
|
||||
buffer_len = build_reparse_buffer(nameW.Buffer, IO_REPARSE_TAG_SYMLINK, &buffer);
|
||||
bret = DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
|
||||
@ -21,7 +21,7 @@ index e0fa36ea64f..cfc0d176b53 100644
|
||||
ok(bret, "Failed to create symlink! (0x%x)\n", GetLastError());
|
||||
|
||||
/* Check the file attributes of the symlink */
|
||||
@@ -5488,6 +5487,24 @@ static void test_reparse_points(void)
|
||||
@@ -5577,6 +5576,24 @@ static void test_reparse_points(void)
|
||||
ok(dwret != (DWORD)~0, "Symlink doesn't exist (attributes: 0x%x)!\n", dwret);
|
||||
ok(dwret & FILE_ATTRIBUTE_REPARSE_POINT, "File is not a symlink! (attributes: %d)\n", dwret);
|
||||
|
||||
@ -47,10 +47,10 @@ index e0fa36ea64f..cfc0d176b53 100644
|
||||
/* Cleanup */
|
||||
pRtlFreeUnicodeString(&nameW);
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index da5136db68c..668f4fe2c80 100644
|
||||
index d9e0388af2d..24871ee8a32 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -6138,6 +6138,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6130,6 +6130,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
int unix_dest_len;
|
||||
DWORD max_length;
|
||||
NTSTATUS status;
|
||||
@ -58,7 +58,7 @@ index da5136db68c..668f4fe2c80 100644
|
||||
WCHAR *nt_dest;
|
||||
ssize_t ret;
|
||||
char *p;
|
||||
@@ -6181,6 +6182,17 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6173,6 +6174,17 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
}
|
||||
buffer->ReparseTag |= (val << i);
|
||||
}
|
||||
@ -76,7 +76,7 @@ index da5136db68c..668f4fe2c80 100644
|
||||
unix_dest_len -= (p - unix_dest);
|
||||
memmove(unix_dest, p, unix_dest_len);
|
||||
unix_dest[unix_dest_len] = 0;
|
||||
@@ -6218,6 +6230,20 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6210,6 +6222,20 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
path_len += (nt_dest_len - prefix_len*sizeof(WCHAR)) + sizeof(WCHAR);
|
||||
total_len = FIELD_OFFSET(typeof(*buffer), MountPointReparseBuffer.PathBuffer[path_len/sizeof(WCHAR)]);
|
||||
break;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 1cd53753c747d30cb1acee7f93264747a58c338b Mon Sep 17 00:00:00 2001
|
||||
From 68b56e8cfc85063df0c7bf93bf32002d4a264858 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 13 Mar 2019 13:02:22 -0600
|
||||
Subject: [PATCH] ntdll: Add support for deleting symlinks.
|
||||
@ -10,10 +10,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
2 files changed, 17 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index cfc0d176b53..1fe5fea47d5 100644
|
||||
index bf9d9677412..3a6396e5afc 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5503,6 +5503,22 @@ static void test_reparse_points(void)
|
||||
@@ -5592,6 +5592,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);
|
||||
@ -37,10 +37,10 @@ index cfc0d176b53..1fe5fea47d5 100644
|
||||
|
||||
cleanup:
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 668f4fe2c80..bddf55faad8 100644
|
||||
index 24871ee8a32..2ff931aa57c 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -6438,6 +6438,7 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
@@ -6430,6 +6430,7 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
switch(buffer->ReparseTag)
|
||||
{
|
||||
case IO_REPARSE_TAG_MOUNT_POINT:
|
||||
|
@ -1,20 +1,21 @@
|
||||
From a56456fcccb14d889925b8f82c2f4c8506143b0a Mon Sep 17 00:00:00 2001
|
||||
From 61a601cef64c692cd846b01478a3462c382afa04 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 11 Apr 2019 12:16:49 -0600
|
||||
Subject: [PATCH] ntdll: Add support for relative symlink creation.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
dlls/ntdll/tests/file.c | 30 +++++++++++---
|
||||
dlls/ntdll/unix/file.c | 92 +++++++++++++++++++++++++++++++++++++----
|
||||
dlls/ntdll/tests/file.c | 30 ++++++++++---
|
||||
dlls/ntdll/unix/file.c | 94 +++++++++++++++++++++++++++++++++++++----
|
||||
include/ntifs.h | 2 +
|
||||
3 files changed, 111 insertions(+), 13 deletions(-)
|
||||
include/winternl.h | 1 +
|
||||
4 files changed, 113 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 1fe5fea47d5..367eef539ce 100644
|
||||
index 3a6396e5afc..1ace7f76c1f 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5234,7 +5234,8 @@ static void test_mailslot_name(void)
|
||||
@@ -5323,7 +5323,8 @@ static void test_mailslot_name(void)
|
||||
CloseHandle( device );
|
||||
}
|
||||
|
||||
@ -24,7 +25,7 @@ index 1fe5fea47d5..367eef539ce 100644
|
||||
{
|
||||
static INT header_size = offsetof(REPARSE_DATA_BUFFER, GenericReparseBuffer);
|
||||
INT buffer_size, struct_size, data_size, string_len, prefix_len;
|
||||
@@ -5252,7 +5253,7 @@ static INT build_reparse_buffer(const WCHAR *filename, ULONG tag, REPARSE_DATA_B
|
||||
@@ -5341,7 +5342,7 @@ static INT build_reparse_buffer(const WCHAR *filename, ULONG tag, REPARSE_DATA_B
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
@ -33,7 +34,7 @@ index 1fe5fea47d5..367eef539ce 100644
|
||||
string_len = lstrlenW(&filename[prefix_len]);
|
||||
data_size = (prefix_len + 2 * string_len + 2) * sizeof(WCHAR);
|
||||
buffer_size = struct_size + data_size;
|
||||
@@ -5272,6 +5273,7 @@ static INT build_reparse_buffer(const WCHAR *filename, ULONG tag, REPARSE_DATA_B
|
||||
@@ -5361,6 +5362,7 @@ static INT build_reparse_buffer(const WCHAR *filename, ULONG tag, REPARSE_DATA_B
|
||||
buffer->SymbolicLinkReparseBuffer.SubstituteNameLength = (prefix_len + string_len) * sizeof(WCHAR);
|
||||
buffer->SymbolicLinkReparseBuffer.PrintNameOffset = (prefix_len + string_len + 1) * sizeof(WCHAR);
|
||||
buffer->SymbolicLinkReparseBuffer.PrintNameLength = string_len * sizeof(WCHAR);
|
||||
@ -41,7 +42,7 @@ index 1fe5fea47d5..367eef539ce 100644
|
||||
subst_dest = &buffer->SymbolicLinkReparseBuffer.PathBuffer[0];
|
||||
print_dest = &buffer->SymbolicLinkReparseBuffer.PathBuffer[prefix_len + string_len + 1];
|
||||
break;
|
||||
@@ -5354,7 +5356,7 @@ static void test_reparse_points(void)
|
||||
@@ -5443,7 +5445,7 @@ static void test_reparse_points(void)
|
||||
}
|
||||
dwret = NtQueryInformationFile(handle, &iosb, &old_attrib, sizeof(old_attrib), FileBasicInformation);
|
||||
ok(dwret == STATUS_SUCCESS, "Failed to get junction point folder's attributes (0x%x).\n", dwret);
|
||||
@ -50,7 +51,7 @@ index 1fe5fea47d5..367eef539ce 100644
|
||||
bret = DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
|
||||
ok(bret, "Failed to create junction point! (0x%x)\n", GetLastError());
|
||||
|
||||
@@ -5401,7 +5403,7 @@ static void test_reparse_points(void)
|
||||
@@ -5490,7 +5492,7 @@ static void test_reparse_points(void)
|
||||
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);
|
||||
@ -59,7 +60,7 @@ index 1fe5fea47d5..367eef539ce 100644
|
||||
bret = DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
|
||||
ok(bret, "Failed to create junction point! (0x%x)\n", GetLastError());
|
||||
CloseHandle(handle);
|
||||
@@ -5416,7 +5418,7 @@ static void test_reparse_points(void)
|
||||
@@ -5505,7 +5507,7 @@ static void test_reparse_points(void)
|
||||
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);
|
||||
@ -68,7 +69,7 @@ index 1fe5fea47d5..367eef539ce 100644
|
||||
bret = DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
|
||||
ok(bret, "Failed to create junction point! (0x%x)\n", GetLastError());
|
||||
CloseHandle(handle);
|
||||
@@ -5478,7 +5480,7 @@ static void test_reparse_points(void)
|
||||
@@ -5567,7 +5569,7 @@ static void test_reparse_points(void)
|
||||
}
|
||||
dwret = NtQueryInformationFile(handle, &iosb, &old_attrib, sizeof(old_attrib), FileBasicInformation);
|
||||
ok(dwret == STATUS_SUCCESS, "Failed to get symlink folder's attributes (0x%x).\n", dwret);
|
||||
@ -77,7 +78,7 @@ index 1fe5fea47d5..367eef539ce 100644
|
||||
bret = DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
|
||||
ok(bret, "Failed to create symlink! (0x%x)\n", GetLastError());
|
||||
|
||||
@@ -5521,6 +5523,22 @@ static void test_reparse_points(void)
|
||||
@@ -5610,6 +5612,22 @@ static void test_reparse_points(void)
|
||||
"Symlink folder's access time does not match.\n");
|
||||
CloseHandle(handle);
|
||||
|
||||
@ -101,10 +102,19 @@ index 1fe5fea47d5..367eef539ce 100644
|
||||
/* Cleanup */
|
||||
pRtlFreeUnicodeString(&nameW);
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index bddf55faad8..d907d455fc9 100644
|
||||
index 2ff931aa57c..2f2658ffb3e 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -5988,17 +5988,20 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer,
|
||||
@@ -3342,7 +3342,7 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer
|
||||
for (ptr = name, end = name + name_len; ptr < end; ptr++)
|
||||
{
|
||||
if (*ptr == '\\') return STATUS_OBJECT_NAME_INVALID; /* duplicate backslash */
|
||||
- if (*ptr == '.')
|
||||
+ if (*ptr == '.' && disposition != FILE_WINE_PATH)
|
||||
{
|
||||
if (ptr + 1 == end) return STATUS_OBJECT_NAME_INVALID; /* "." element */
|
||||
if (ptr[1] == '\\') return STATUS_OBJECT_NAME_INVALID; /* "." element */
|
||||
@@ -5980,17 +5980,20 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer,
|
||||
*/
|
||||
NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
{
|
||||
@ -127,7 +137,7 @@ index bddf55faad8..d907d455fc9 100644
|
||||
int i;
|
||||
|
||||
switch(buffer->ReparseTag)
|
||||
@@ -6007,11 +6010,13 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -5999,11 +6002,13 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
dest_len = buffer->MountPointReparseBuffer.SubstituteNameLength;
|
||||
offset = buffer->MountPointReparseBuffer.SubstituteNameOffset;
|
||||
dest = &buffer->MountPointReparseBuffer.PathBuffer[offset];
|
||||
@ -141,7 +151,7 @@ index bddf55faad8..d907d455fc9 100644
|
||||
break;
|
||||
default:
|
||||
FIXME("stub: FSCTL_SET_REPARSE_POINT(%x)\n", buffer->ReparseTag);
|
||||
@@ -6024,8 +6029,66 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6016,8 +6021,66 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
if ((status = server_get_unix_name( handle, &unix_src )))
|
||||
goto cleanup;
|
||||
src_allocated = TRUE;
|
||||
@ -210,7 +220,7 @@ index bddf55faad8..d907d455fc9 100644
|
||||
for (;;)
|
||||
{
|
||||
unix_dest = malloc( unix_dest_len );
|
||||
@@ -6041,11 +6104,24 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6033,11 +6096,24 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
if (status != STATUS_SUCCESS && status != STATUS_NO_SUCH_FILE)
|
||||
goto cleanup;
|
||||
dest_allocated = TRUE;
|
||||
@ -237,7 +247,7 @@ index bddf55faad8..d907d455fc9 100644
|
||||
for (i = 0; i < sizeof(ULONG)*8; i++)
|
||||
{
|
||||
if ((buffer->ReparseTag >> i) & 1)
|
||||
@@ -6066,7 +6142,7 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6058,7 +6134,7 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
strcat( magic_dest, "." );
|
||||
strcat( magic_dest, "/" );
|
||||
}
|
||||
@ -246,7 +256,7 @@ index bddf55faad8..d907d455fc9 100644
|
||||
|
||||
/* Produce the link in a temporary location in the same folder */
|
||||
strcpy( tmpdir, unix_src );
|
||||
@@ -6116,7 +6192,9 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6108,7 +6184,9 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
|
||||
cleanup:
|
||||
if (tempdir_created) rmdir( tmpdir );
|
||||
@ -267,6 +277,18 @@ index ab3273d3f81..0d02225bc4f 100644
|
||||
+#define SYMLINK_FLAG_RELATIVE 0x00000001
|
||||
+
|
||||
#endif /* __WINE_NTIFS_H */
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index 68aa4afc176..9e39f2aa5b8 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -2798,6 +2798,7 @@ typedef struct _RTL_ATOM_TABLE
|
||||
#define FILE_OVERWRITE 4
|
||||
#define FILE_OVERWRITE_IF 5
|
||||
#define FILE_MAXIMUM_DISPOSITION 5
|
||||
+#define FILE_WINE_PATH 6
|
||||
|
||||
/* Characteristics of a File System */
|
||||
#define FILE_REMOVABLE_MEDIA 0x00000001
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From de6ef008eced847e63429f1a09fe1e7573110093 Mon Sep 17 00:00:00 2001
|
||||
From 9e13af5faec34f398440f88d357c16a01687c6ac Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 11 Apr 2019 12:31:16 -0600
|
||||
Subject: [PATCH] ntdll: Add support for reading relative symlinks.
|
||||
@ -10,10 +10,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
2 files changed, 47 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 367eef539ce..46aadeb7e7d 100644
|
||||
index 1ace7f76c1f..2f0903fe7f1 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5536,9 +5536,22 @@ static void test_reparse_points(void)
|
||||
@@ -5625,9 +5625,22 @@ static void test_reparse_points(void)
|
||||
ok(dwret == STATUS_SUCCESS, "Failed to get symlink folder's attributes (0x%x).\n", dwret);
|
||||
buffer_len = build_reparse_buffer(&targetW[1], IO_REPARSE_TAG_SYMLINK, SYMLINK_FLAG_RELATIVE, &buffer);
|
||||
bret = DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
|
||||
@ -38,10 +38,10 @@ index 367eef539ce..46aadeb7e7d 100644
|
||||
/* Cleanup */
|
||||
pRtlFreeUnicodeString(&nameW);
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index d907d455fc9..3a25b803d6f 100644
|
||||
index 2f2658ffb3e..dd5924731ad 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -6238,6 +6238,11 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6230,6 +6230,11 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
|
||||
/* Decode the reparse tag from the symlink */
|
||||
p = unix_dest;
|
||||
@ -53,7 +53,7 @@ index d907d455fc9..3a25b803d6f 100644
|
||||
if (*p++ != '/')
|
||||
{
|
||||
status = STATUS_NOT_IMPLEMENTED;
|
||||
@@ -6275,24 +6280,47 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6267,24 +6272,47 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
memmove(unix_dest, p, unix_dest_len);
|
||||
unix_dest[unix_dest_len] = 0;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9129b44e1ef8458064d773a5605d1ff182d67c54 Mon Sep 17 00:00:00 2001
|
||||
From 305cf8b8d52fee284d4b34160bdacd0aef8ddbb0 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 11 Apr 2019 17:57:53 -0600
|
||||
Subject: [PATCH] ntdll: Add support for file symlinks.
|
||||
@ -10,10 +10,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
2 files changed, 49 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 46aadeb7e7d..e5cfbb68793 100644
|
||||
index 2f0903fe7f1..dd1fe247288 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5463,6 +5463,35 @@ static void test_reparse_points(void)
|
||||
@@ -5552,6 +5552,35 @@ static void test_reparse_points(void)
|
||||
/* Delete the junction point directory and create a blank slate for symlink tests */
|
||||
bret = RemoveDirectoryW(reparse_path);
|
||||
ok(bret, "Failed to delete junction point!\n");
|
||||
@ -50,10 +50,10 @@ index 46aadeb7e7d..e5cfbb68793 100644
|
||||
ok(bret, "Failed to create junction point directory.\n");
|
||||
dwret = GetFileAttributesW(reparse_path);
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 3a25b803d6f..ead0c48d62e 100644
|
||||
index dd5924731ad..3e4341df363 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -5998,6 +5998,7 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -5990,6 +5990,7 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
int relative_offset = 0;
|
||||
UNICODE_STRING nt_dest;
|
||||
int dest_len, offset;
|
||||
@ -61,7 +61,7 @@ index 3a25b803d6f..ead0c48d62e 100644
|
||||
NTSTATUS status;
|
||||
struct stat st;
|
||||
WCHAR *dest;
|
||||
@@ -6131,7 +6132,6 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6123,7 +6124,6 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
/* Encode the type (file or directory) if NT symlink */
|
||||
if (buffer->ReparseTag == IO_REPARSE_TAG_SYMLINK)
|
||||
{
|
||||
@ -69,7 +69,7 @@ index 3a25b803d6f..ead0c48d62e 100644
|
||||
if (fstat( dest_fd, &st ) == -1)
|
||||
{
|
||||
status = errno_to_status( errno );
|
||||
@@ -6165,8 +6165,11 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6157,8 +6157,11 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
/* Atomically move the link into position */
|
||||
if (!renameat2( -1, tmplink, -1, unix_src, RENAME_EXCHANGE ))
|
||||
{
|
||||
@ -83,7 +83,7 @@ index 3a25b803d6f..ead0c48d62e 100644
|
||||
}
|
||||
else if (errno == ENOSYS)
|
||||
{
|
||||
@@ -6383,6 +6386,7 @@ NTSTATUS remove_reparse_point(HANDLE handle, REPARSE_GUID_DATA_BUFFER *buffer)
|
||||
@@ -6375,6 +6378,7 @@ NTSTATUS remove_reparse_point(HANDLE handle, REPARSE_GUID_DATA_BUFFER *buffer)
|
||||
char tmpdir[PATH_MAX], tmpfile[PATH_MAX], *d;
|
||||
BOOL tempdir_created = FALSE;
|
||||
int dest_fd, needs_close;
|
||||
@ -91,7 +91,7 @@ index 3a25b803d6f..ead0c48d62e 100644
|
||||
NTSTATUS status;
|
||||
char *unix_name;
|
||||
struct stat st;
|
||||
@@ -6395,12 +6399,13 @@ NTSTATUS remove_reparse_point(HANDLE handle, REPARSE_GUID_DATA_BUFFER *buffer)
|
||||
@@ -6387,12 +6391,13 @@ NTSTATUS remove_reparse_point(HANDLE handle, REPARSE_GUID_DATA_BUFFER *buffer)
|
||||
|
||||
TRACE( "Deleting symlink %s\n", unix_name );
|
||||
|
||||
@ -106,7 +106,7 @@ index 3a25b803d6f..ead0c48d62e 100644
|
||||
strcpy( tmpdir, unix_name );
|
||||
d = dirname( tmpdir);
|
||||
if (d != tmpdir) strcpy( tmpdir, d );
|
||||
@@ -6413,11 +6418,21 @@ NTSTATUS remove_reparse_point(HANDLE handle, REPARSE_GUID_DATA_BUFFER *buffer)
|
||||
@@ -6405,11 +6410,21 @@ NTSTATUS remove_reparse_point(HANDLE handle, REPARSE_GUID_DATA_BUFFER *buffer)
|
||||
tempdir_created = TRUE;
|
||||
strcpy( tmpfile, tmpdir );
|
||||
strcat( tmpfile, "/tmpfile" );
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5c409a2387a0df100f0fe163d48ab86b66fefa20 Mon Sep 17 00:00:00 2001
|
||||
From f3adc1cfdff14e1baca4e8e0f42774435f85c110 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Tue, 30 Apr 2019 16:24:54 -0600
|
||||
Subject: [PATCH] ntdll: Allow creation of dangling reparse points to
|
||||
@ -7,14 +7,13 @@ Subject: [PATCH] ntdll: Allow creation of dangling reparse points to
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
dlls/ntdll/unix/file.c | 19 +++++++++++++++++--
|
||||
include/winternl.h | 1 +
|
||||
2 files changed, 18 insertions(+), 2 deletions(-)
|
||||
1 file changed, 17 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index ead0c48d62e..be57865f6b3 100644
|
||||
index 3e4341df363..d654f82e8d7 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -3388,7 +3388,8 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer
|
||||
@@ -3409,7 +3409,8 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer
|
||||
/* if this is the last element, not finding it is not necessarily fatal */
|
||||
if (!name_len)
|
||||
{
|
||||
@ -24,7 +23,7 @@ index ead0c48d62e..be57865f6b3 100644
|
||||
{
|
||||
status = STATUS_OBJECT_NAME_NOT_FOUND;
|
||||
if (disposition != FILE_OPEN && disposition != FILE_OVERWRITE)
|
||||
@@ -3408,6 +3409,20 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer
|
||||
@@ -3429,6 +3430,20 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer
|
||||
status = STATUS_OBJECT_NAME_COLLISION;
|
||||
}
|
||||
}
|
||||
@ -45,7 +44,7 @@ index ead0c48d62e..be57865f6b3 100644
|
||||
|
||||
if (status != STATUS_SUCCESS) break;
|
||||
|
||||
@@ -6098,7 +6113,7 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6090,7 +6105,7 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
status = STATUS_NO_MEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
@ -54,18 +53,6 @@ index ead0c48d62e..be57865f6b3 100644
|
||||
if (status != STATUS_BUFFER_TOO_SMALL) break;
|
||||
free( unix_dest );
|
||||
}
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index 8bfc7de67d0..2daee57e50f 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -2678,6 +2678,7 @@ typedef struct _RTL_ATOM_TABLE
|
||||
#define FILE_OVERWRITE 4
|
||||
#define FILE_OVERWRITE_IF 5
|
||||
#define FILE_MAXIMUM_DISPOSITION 5
|
||||
+#define FILE_WINE_PATH 6
|
||||
|
||||
/* Characteristics of a File System */
|
||||
#define FILE_REMOVABLE_MEDIA 0x00000001
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 99f1cef882a3f8098c76cf0918b99882533d1bbd Mon Sep 17 00:00:00 2001
|
||||
From ae2de3a0dd9c403317e6e681bb32d13907e2f61a Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Sat, 30 Mar 2019 12:00:51 -0600
|
||||
Subject: [PATCH] ntdll: Correctly report file symbolic links as files.
|
||||
@ -9,7 +9,7 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
1 file changed, 78 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index be57865f6b3..94be474a0ff 100644
|
||||
index d654f82e8d7..a84062df272 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -1606,6 +1606,9 @@ static inline int get_file_xattr( char *hexattr, int attrlen )
|
||||
@ -42,7 +42,7 @@ index be57865f6b3..94be474a0ff 100644
|
||||
}
|
||||
else if (S_ISDIR( st->st_mode ) && (parent_path = malloc( strlen(path) + 4 )))
|
||||
{
|
||||
@@ -6219,46 +6227,35 @@ cleanup:
|
||||
@@ -6211,46 +6219,35 @@ cleanup:
|
||||
}
|
||||
|
||||
|
||||
@ -105,7 +105,7 @@ index be57865f6b3..94be474a0ff 100644
|
||||
p++;
|
||||
}
|
||||
if (*p++ != '/')
|
||||
@@ -6266,7 +6263,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6258,7 +6255,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
status = STATUS_NOT_IMPLEMENTED;
|
||||
goto cleanup;
|
||||
}
|
||||
@ -114,7 +114,7 @@ index be57865f6b3..94be474a0ff 100644
|
||||
for (i = 0; i < sizeof(ULONG)*8; i++)
|
||||
{
|
||||
char c = *p++;
|
||||
@@ -6281,22 +6278,65 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6273,22 +6270,65 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
status = STATUS_NOT_IMPLEMENTED;
|
||||
goto cleanup;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 29337136ad7b6bdacd2910622ef3685ebacfe8fa Mon Sep 17 00:00:00 2001
|
||||
From 78a4666b1a010b45f8ac13cd4be3d4cdecb3dfdc Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Sun, 22 Nov 2020 22:35:50 -0700
|
||||
Subject: [PATCH] kernelbase: Convert FILE_FLAG_OPEN_REPARSE_POINT for passing
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 05c1471fc29add8269c805692def9107de436bfa Mon Sep 17 00:00:00 2001
|
||||
From 8bf803c2e96ff62b165551f2cd4dae1cc98ca7b3 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Sat, 12 Dec 2020 16:54:28 -0700
|
||||
Subject: [PATCH] server: Implement FILE_OPEN_REPARSE_POINT option.
|
||||
@ -9,10 +9,10 @@ Subject: [PATCH] server: Implement FILE_OPEN_REPARSE_POINT option.
|
||||
2 files changed, 55 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index e5cfbb68793..f3eecbbc708 100644
|
||||
index dd1fe247288..490d5160761 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5299,6 +5299,7 @@ static void test_reparse_points(void)
|
||||
@@ -5388,6 +5388,7 @@ static void test_reparse_points(void)
|
||||
static const WCHAR dotW[] = {'.',0};
|
||||
REPARSE_DATA_BUFFER *buffer = NULL;
|
||||
DWORD dwret, dwLen, dwFlags, err;
|
||||
@ -20,7 +20,7 @@ index e5cfbb68793..f3eecbbc708 100644
|
||||
HANDLE handle, token;
|
||||
IO_STATUS_BLOCK iosb;
|
||||
UNICODE_STRING nameW;
|
||||
@@ -5386,7 +5387,7 @@ static void test_reparse_points(void)
|
||||
@@ -5475,7 +5476,7 @@ static void test_reparse_points(void)
|
||||
memset(&old_attrib, 0x00, sizeof(old_attrib));
|
||||
old_attrib.LastAccessTime.QuadPart = 0x200deadcafebeef;
|
||||
dwret = NtSetInformationFile(handle, &iosb, &old_attrib, sizeof(old_attrib), FileBasicInformation);
|
||||
@ -29,7 +29,7 @@ index e5cfbb68793..f3eecbbc708 100644
|
||||
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,
|
||||
@@ -5395,7 +5396,7 @@ static void test_reparse_points(void)
|
||||
@@ -5484,7 +5485,7 @@ static void test_reparse_points(void)
|
||||
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%x).\n", dwret);
|
||||
@ -38,7 +38,7 @@ index e5cfbb68793..f3eecbbc708 100644
|
||||
"Junction point folder's access time does not match.\n");
|
||||
CloseHandle(handle);
|
||||
|
||||
@@ -5476,6 +5477,24 @@ static void test_reparse_points(void)
|
||||
@@ -5565,6 +5566,24 @@ static void test_reparse_points(void)
|
||||
ok(bret, "Failed to create symlink! (0x%x)\n", GetLastError());
|
||||
CloseHandle(handle);
|
||||
|
||||
@ -63,7 +63,7 @@ index e5cfbb68793..f3eecbbc708 100644
|
||||
/* Check deleting a file symlink as if it were a directory */
|
||||
bret = RemoveDirectoryW(reparse_path);
|
||||
todo_wine ok(!bret, "Succeeded in deleting file symlink as a directory!\n");
|
||||
@@ -5539,7 +5558,7 @@ static void test_reparse_points(void)
|
||||
@@ -5628,7 +5647,7 @@ static void test_reparse_points(void)
|
||||
memset(&old_attrib, 0x00, sizeof(old_attrib));
|
||||
old_attrib.LastAccessTime.QuadPart = 0x200deadcafebeef;
|
||||
dwret = NtSetInformationFile(handle, &iosb, &old_attrib, sizeof(old_attrib), FileBasicInformation);
|
||||
@ -72,7 +72,7 @@ index e5cfbb68793..f3eecbbc708 100644
|
||||
memset(&guid_buffer, 0x00, sizeof(guid_buffer));
|
||||
guid_buffer.ReparseTag = IO_REPARSE_TAG_SYMLINK;
|
||||
bret = DeviceIoControl(handle, FSCTL_DELETE_REPARSE_POINT, (LPVOID)&guid_buffer,
|
||||
@@ -5548,7 +5567,7 @@ static void test_reparse_points(void)
|
||||
@@ -5637,7 +5656,7 @@ static void test_reparse_points(void)
|
||||
memset(&new_attrib, 0x00, sizeof(new_attrib));
|
||||
dwret = NtQueryInformationFile(handle, &iosb, &new_attrib, sizeof(new_attrib), FileBasicInformation);
|
||||
ok(dwret == STATUS_SUCCESS, "Failed to get symlink folder's attributes (0x%x).\n", dwret);
|
||||
@ -82,7 +82,7 @@ index e5cfbb68793..f3eecbbc708 100644
|
||||
CloseHandle(handle);
|
||||
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index 2605adf96ff..4fe7e6de53f 100644
|
||||
index 2adadceae25..4f3197a470a 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -107,6 +107,10 @@
|
||||
@ -96,7 +96,7 @@ index 2605adf96ff..4fe7e6de53f 100644
|
||||
#if defined(HAVE_SYS_EPOLL_H) && defined(HAVE_EPOLL_CREATE)
|
||||
# include <sys/epoll.h>
|
||||
# define USE_EPOLL
|
||||
@@ -1898,6 +1902,14 @@ void get_nt_name( struct fd *fd, struct unicode_str *name )
|
||||
@@ -1895,6 +1899,14 @@ void get_nt_name( struct fd *fd, struct unicode_str *name )
|
||||
name->len = fd->nt_namelen;
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ index 2605adf96ff..4fe7e6de53f 100644
|
||||
/* open() wrapper that returns a struct fd with no fd user set */
|
||||
struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_name,
|
||||
int flags, mode_t *mode, unsigned int access,
|
||||
@@ -1958,6 +1970,18 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -1955,6 +1967,18 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
}
|
||||
else rw_mode = O_RDONLY;
|
||||
|
||||
@ -130,7 +130,7 @@ index 2605adf96ff..4fe7e6de53f 100644
|
||||
if ((fd->unix_fd = open( name, rw_mode | (flags & ~O_TRUNC), *mode )) == -1)
|
||||
{
|
||||
/* if we tried to open a directory for write access, retry read-only */
|
||||
@@ -1975,12 +1999,6 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -1972,12 +1996,6 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
}
|
||||
|
||||
fd->nt_name = dup_nt_name( root, nt_name, &fd->nt_namelen );
|
||||
@ -143,7 +143,7 @@ index 2605adf96ff..4fe7e6de53f 100644
|
||||
|
||||
closed_fd->unix_fd = fd->unix_fd;
|
||||
closed_fd->unlink = 0;
|
||||
@@ -2425,6 +2443,7 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
|
||||
@@ -2428,6 +2446,7 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
|
||||
|
||||
static int is_dir_empty( int fd )
|
||||
{
|
||||
@ -151,7 +151,7 @@ index 2605adf96ff..4fe7e6de53f 100644
|
||||
DIR *dir;
|
||||
int empty;
|
||||
struct dirent *de;
|
||||
@@ -2432,8 +2451,13 @@ static int is_dir_empty( int fd )
|
||||
@@ -2435,8 +2454,13 @@ static int is_dir_empty( int fd )
|
||||
if ((fd = dup( fd )) == -1)
|
||||
return -1;
|
||||
|
||||
@ -166,7 +166,7 @@ index 2605adf96ff..4fe7e6de53f 100644
|
||||
close( fd );
|
||||
return -1;
|
||||
}
|
||||
@@ -2445,6 +2469,7 @@ static int is_dir_empty( int fd )
|
||||
@@ -2448,6 +2472,7 @@ static int is_dir_empty( int fd )
|
||||
empty = 0;
|
||||
}
|
||||
closedir( dir );
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2b954893dcd3d0088f214c6a12846a3cf1149e24 Mon Sep 17 00:00:00 2001
|
||||
From 27c9c2851bb3629cb47134efe3a2162bca80aca6 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Sun, 22 Nov 2020 22:37:33 -0700
|
||||
Subject: [PATCH] ntdll: Allow set_file_times_precise to work on reparse
|
||||
@ -11,10 +11,10 @@ Subject: [PATCH] ntdll: Allow set_file_times_precise to work on reparse
|
||||
3 files changed, 24 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7553b22e76d..7ed08b6336d 100644
|
||||
index f80fbd737ef..fb71556cfa3 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2227,7 +2227,8 @@ AC_CHECK_FUNCS(\
|
||||
@@ -2223,7 +2223,8 @@ AC_CHECK_FUNCS(\
|
||||
sigprocmask \
|
||||
symlink \
|
||||
tcdrain \
|
||||
@ -25,10 +25,10 @@ index 7553b22e76d..7ed08b6336d 100644
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index f3eecbbc708..17ed907d628 100644
|
||||
index 490d5160761..2449ee54799 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5387,7 +5387,7 @@ static void test_reparse_points(void)
|
||||
@@ -5476,7 +5476,7 @@ static void test_reparse_points(void)
|
||||
memset(&old_attrib, 0x00, sizeof(old_attrib));
|
||||
old_attrib.LastAccessTime.QuadPart = 0x200deadcafebeef;
|
||||
dwret = NtSetInformationFile(handle, &iosb, &old_attrib, sizeof(old_attrib), FileBasicInformation);
|
||||
@ -37,7 +37,7 @@ index f3eecbbc708..17ed907d628 100644
|
||||
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,
|
||||
@@ -5396,7 +5396,7 @@ static void test_reparse_points(void)
|
||||
@@ -5485,7 +5485,7 @@ static void test_reparse_points(void)
|
||||
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%x).\n", dwret);
|
||||
@ -46,7 +46,7 @@ index f3eecbbc708..17ed907d628 100644
|
||||
"Junction point folder's access time does not match.\n");
|
||||
CloseHandle(handle);
|
||||
|
||||
@@ -5558,7 +5558,7 @@ static void test_reparse_points(void)
|
||||
@@ -5647,7 +5647,7 @@ static void test_reparse_points(void)
|
||||
memset(&old_attrib, 0x00, sizeof(old_attrib));
|
||||
old_attrib.LastAccessTime.QuadPart = 0x200deadcafebeef;
|
||||
dwret = NtSetInformationFile(handle, &iosb, &old_attrib, sizeof(old_attrib), FileBasicInformation);
|
||||
@ -55,7 +55,7 @@ index f3eecbbc708..17ed907d628 100644
|
||||
memset(&guid_buffer, 0x00, sizeof(guid_buffer));
|
||||
guid_buffer.ReparseTag = IO_REPARSE_TAG_SYMLINK;
|
||||
bret = DeviceIoControl(handle, FSCTL_DELETE_REPARSE_POINT, (LPVOID)&guid_buffer,
|
||||
@@ -5567,7 +5567,7 @@ static void test_reparse_points(void)
|
||||
@@ -5656,7 +5656,7 @@ static void test_reparse_points(void)
|
||||
memset(&new_attrib, 0x00, sizeof(new_attrib));
|
||||
dwret = NtQueryInformationFile(handle, &iosb, &new_attrib, sizeof(new_attrib), FileBasicInformation);
|
||||
ok(dwret == STATUS_SUCCESS, "Failed to get symlink folder's attributes (0x%x).\n", dwret);
|
||||
@ -65,7 +65,7 @@ index f3eecbbc708..17ed907d628 100644
|
||||
CloseHandle(handle);
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 94be474a0ff..319f42e9e0c 100644
|
||||
index a84062df272..185f7e3bbeb 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -1731,6 +1731,14 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 4ee6ccb3ca1639d81bd9e8ce572131905e6a8df1 Mon Sep 17 00:00:00 2001
|
||||
From 9b5273bca73d9bd0d86a30f4517c6d37297c8c12 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Sat, 30 Mar 2019 13:41:07 -0600
|
||||
Subject: [PATCH] server: Properly handle file symlink deletion.
|
||||
@ -10,10 +10,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
2 files changed, 62 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 17ed907d628..a4648dd65e0 100644
|
||||
index 2449ee54799..9fe806ff3cc 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5497,18 +5497,18 @@ static void test_reparse_points(void)
|
||||
@@ -5586,18 +5586,18 @@ static void test_reparse_points(void)
|
||||
|
||||
/* Check deleting a file symlink as if it were a directory */
|
||||
bret = RemoveDirectoryW(reparse_path);
|
||||
@ -39,10 +39,10 @@ index 17ed907d628..a4648dd65e0 100644
|
||||
/* Create a blank slate for directory symlink tests */
|
||||
bret = CreateDirectoryW(reparse_path, NULL);
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index 4fe7e6de53f..fcffe4a4afd 100644
|
||||
index 4f3197a470a..fa5805ba840 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -1910,6 +1910,55 @@ int check_symlink( char *name )
|
||||
@@ -1907,6 +1907,55 @@ int check_symlink( char *name )
|
||||
return S_ISLNK( st.st_mode );
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ index 4fe7e6de53f..fcffe4a4afd 100644
|
||||
/* open() wrapper that returns a struct fd with no fd user set */
|
||||
struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_name,
|
||||
int flags, mode_t *mode, unsigned int access,
|
||||
@@ -2012,6 +2061,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -2009,6 +2058,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
{
|
||||
unsigned int err;
|
||||
struct inode *inode = get_inode( st.st_dev, st.st_ino, fd->unix_fd );
|
||||
@ -106,7 +106,7 @@ index 4fe7e6de53f..fcffe4a4afd 100644
|
||||
|
||||
if (!inode)
|
||||
{
|
||||
@@ -2026,16 +2076,20 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -2023,16 +2073,20 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
list_add_head( &inode->open, &fd->inode_entry );
|
||||
closed_fd = NULL;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 4f38f2552b1d31e427ea0c45f2146485a4ade4ee Mon Sep 17 00:00:00 2001
|
||||
From ad32c366caa3737a2695c8d138972baafe5b152e Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Sat, 12 Dec 2020 17:40:27 -0700
|
||||
Subject: [PATCH] server: Properly handle deleting dangling symlinks.
|
||||
@ -8,10 +8,10 @@ Subject: [PATCH] server: Properly handle deleting dangling symlinks.
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index fcffe4a4afd..4ef3c673268 100644
|
||||
index fa5805ba840..c8fa494caf9 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -2029,6 +2029,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -2026,6 +2026,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
#endif
|
||||
fd->unlink_name = path;
|
||||
fd->unix_name = realpath( path, NULL );
|
||||
@ -19,7 +19,7 @@ index fcffe4a4afd..4ef3c673268 100644
|
||||
}
|
||||
|
||||
if ((fd->unix_fd = open( name, rw_mode | (flags & ~O_TRUNC), *mode )) == -1)
|
||||
@@ -2551,7 +2552,7 @@ static void set_fd_disposition( struct fd *fd, int unlink )
|
||||
@@ -2565,7 +2566,7 @@ static void set_fd_disposition( struct fd *fd, int unlink )
|
||||
file_set_error();
|
||||
return;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 948fd2c1ec52cb7921d23b3fbaaf355075928611 Mon Sep 17 00:00:00 2001
|
||||
From 5449c86f52875d80d4ce0e8001b17dd47552e1a7 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Sat, 12 Dec 2020 17:35:21 -0700
|
||||
Subject: [PATCH] kernelbase: Use FILE_OPEN_REPARSE_POINT in
|
||||
|
@ -1,4 +1,4 @@
|
||||
From de51b2d861f5cd8c9cca5b0a6b30be6ef8f94d7a Mon Sep 17 00:00:00 2001
|
||||
From 5f568c0ffd0eb113d86ddd0fd24aa70ae9b9aae5 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 1 May 2019 12:06:20 -0600
|
||||
Subject: [PATCH] ntdll: Always report symbolic links as containing zero bytes.
|
||||
@ -10,10 +10,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
2 files changed, 45 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index a4648dd65e0..6e5082980bf 100644
|
||||
index 9fe806ff3cc..ebed2600920 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5299,6 +5299,7 @@ static void test_reparse_points(void)
|
||||
@@ -5388,6 +5388,7 @@ static void test_reparse_points(void)
|
||||
static const WCHAR dotW[] = {'.',0};
|
||||
REPARSE_DATA_BUFFER *buffer = NULL;
|
||||
DWORD dwret, dwLen, dwFlags, err;
|
||||
@ -21,7 +21,7 @@ index a4648dd65e0..6e5082980bf 100644
|
||||
WCHAR buf[] = {0,0,0,0};
|
||||
HANDLE handle, token;
|
||||
IO_STATUS_BLOCK iosb;
|
||||
@@ -5438,8 +5439,6 @@ static void test_reparse_points(void)
|
||||
@@ -5527,8 +5528,6 @@ static void test_reparse_points(void)
|
||||
"Unexpected junction point attributes (0x%x != 0x410)!\n", dwret);
|
||||
bret = RemoveDirectoryW(target_path);
|
||||
ok(bret, "Failed to delete junction point target!\n");
|
||||
@ -30,7 +30,7 @@ index a4648dd65e0..6e5082980bf 100644
|
||||
|
||||
/* Establish permissions for symlink creation */
|
||||
bret = OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &token);
|
||||
@@ -5464,6 +5463,13 @@ static void test_reparse_points(void)
|
||||
@@ -5553,6 +5552,13 @@ static void test_reparse_points(void)
|
||||
/* Delete the junction point directory and create a blank slate for symlink tests */
|
||||
bret = RemoveDirectoryW(reparse_path);
|
||||
ok(bret, "Failed to delete junction point!\n");
|
||||
@ -44,7 +44,7 @@ index a4648dd65e0..6e5082980bf 100644
|
||||
|
||||
/* Create the file symlink */
|
||||
HeapFree(GetProcessHeap(), 0, buffer);
|
||||
@@ -5477,6 +5483,37 @@ static void test_reparse_points(void)
|
||||
@@ -5566,6 +5572,37 @@ static void test_reparse_points(void)
|
||||
ok(bret, "Failed to create symlink! (0x%x)\n", GetLastError());
|
||||
CloseHandle(handle);
|
||||
|
||||
@ -82,7 +82,7 @@ index a4648dd65e0..6e5082980bf 100644
|
||||
/* Check the size/data of the symlink target when opened with FILE_FLAG_OPEN_REPARSE_POINT */
|
||||
handle = CreateFileW(target_path, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING,
|
||||
FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0);
|
||||
@@ -5516,6 +5553,10 @@ static void test_reparse_points(void)
|
||||
@@ -5605,6 +5642,10 @@ static void test_reparse_points(void)
|
||||
dwret = GetFileAttributesW(reparse_path);
|
||||
ok(dwret != (DWORD)~0, "Path doesn't exist (attributes: 0x%x)!\n", dwret);
|
||||
ok(!(dwret & FILE_ATTRIBUTE_REPARSE_POINT), "File is already a reparse point! (attributes: %d)\n", dwret);
|
||||
@ -94,7 +94,7 @@ index a4648dd65e0..6e5082980bf 100644
|
||||
/* Create the directory symlink */
|
||||
HeapFree(GetProcessHeap(), 0, buffer);
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 319f42e9e0c..2561afd6d53 100644
|
||||
index 185f7e3bbeb..fcdc596ff74 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -1697,6 +1697,8 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 60436fb0d205508589a76cda2476013b90f5b601 Mon Sep 17 00:00:00 2001
|
||||
From 2f1bed1d771ce85833c36a5f31e8a23ac655e33d Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 1 May 2019 17:48:51 -0600
|
||||
Subject: [PATCH] ntdll: Find dangling symlinks quickly.
|
||||
@ -12,10 +12,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 2561afd6d53..e1b3b2692ee 100644
|
||||
index fcdc596ff74..c4efbc40878 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -2709,7 +2709,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i
|
||||
@@ -2730,7 +2730,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i
|
||||
if (ret >= 0 && ret <= MAX_DIR_ENTRY_LEN)
|
||||
{
|
||||
unix_name[pos + ret] = 0;
|
||||
@ -24,7 +24,7 @@ index 2561afd6d53..e1b3b2692ee 100644
|
||||
}
|
||||
if (check_case) goto not_found; /* we want an exact match */
|
||||
|
||||
@@ -3373,7 +3373,7 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer
|
||||
@@ -3394,7 +3394,7 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer
|
||||
char *p;
|
||||
unix_name[pos + 1 + ret] = 0;
|
||||
for (p = unix_name + pos ; *p; p++) if (*p == '\\') *p = '/';
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3bbfa5b27b5d1f5f0cbac1d3551b7da5731685c4 Mon Sep 17 00:00:00 2001
|
||||
From 8f44306c926d3e72fea2b5ffcd8c0b5b8c32f8b0 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Sat, 18 Jul 2020 09:13:29 -0600
|
||||
Subject: [PATCH] server: Fix obtaining information about a symlink.
|
||||
@ -11,7 +11,7 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
3 files changed, 15 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index e1b3b2692ee..996e8d029d0 100644
|
||||
index c4efbc40878..4c0e864a011 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -1989,7 +1989,7 @@ static NTSTATUS fill_file_info( const struct stat *st, ULONG attr, void *ptr,
|
||||
@ -31,7 +31,7 @@ index e1b3b2692ee..996e8d029d0 100644
|
||||
wine_server_set_reply( req, name, size );
|
||||
ret = wine_server_call( req );
|
||||
size = reply->name_len;
|
||||
@@ -2176,7 +2177,7 @@ static NTSTATUS get_mountmgr_fs_info( HANDLE handle, int fd, struct mountmgr_uni
|
||||
@@ -2197,7 +2198,7 @@ static NTSTATUS get_mountmgr_fs_info( HANDLE handle, int fd, struct mountmgr_uni
|
||||
NTSTATUS status;
|
||||
int letter;
|
||||
|
||||
@ -40,7 +40,7 @@ index e1b3b2692ee..996e8d029d0 100644
|
||||
letter = find_dos_device( unix_name );
|
||||
free( unix_name );
|
||||
|
||||
@@ -4396,7 +4397,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
|
||||
@@ -4415,7 +4416,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
|
||||
if (fd_get_file_info( fd, options, &st, &attr ) == -1) io->u.Status = errno_to_status( errno );
|
||||
else if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode))
|
||||
io->u.Status = STATUS_INVALID_INFO_CLASS;
|
||||
@ -49,7 +49,7 @@ index e1b3b2692ee..996e8d029d0 100644
|
||||
{
|
||||
LONG name_len = len - FIELD_OFFSET(FILE_ALL_INFORMATION, NameInformation.FileName);
|
||||
|
||||
@@ -4457,7 +4458,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
|
||||
@@ -4476,7 +4477,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
|
||||
FILE_NAME_INFORMATION *info = ptr;
|
||||
char *unix_name;
|
||||
|
||||
@ -58,7 +58,7 @@ index e1b3b2692ee..996e8d029d0 100644
|
||||
{
|
||||
LONG name_len = len - FIELD_OFFSET(FILE_NAME_INFORMATION, FileName);
|
||||
io->u.Status = fill_name_info( unix_name, info, &name_len );
|
||||
@@ -4471,7 +4472,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
|
||||
@@ -4490,7 +4491,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
|
||||
FILE_NETWORK_OPEN_INFORMATION *info = ptr;
|
||||
char *unix_name;
|
||||
|
||||
@ -67,7 +67,7 @@ index e1b3b2692ee..996e8d029d0 100644
|
||||
{
|
||||
ULONG attributes;
|
||||
struct stat st;
|
||||
@@ -6066,7 +6067,7 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6058,7 +6059,7 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
if ((status = server_get_unix_fd( handle, FILE_SPECIAL_ACCESS, &dest_fd, &needs_close, NULL, NULL )))
|
||||
return status;
|
||||
|
||||
@ -76,7 +76,7 @@ index e1b3b2692ee..996e8d029d0 100644
|
||||
goto cleanup;
|
||||
src_allocated = TRUE;
|
||||
if (flags == SYMLINK_FLAG_RELATIVE)
|
||||
@@ -6347,7 +6348,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6339,7 +6340,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
if ((status = server_get_unix_fd( handle, FILE_ANY_ACCESS, &dest_fd, &needs_close, NULL, NULL )))
|
||||
return status;
|
||||
|
||||
@ -85,7 +85,7 @@ index e1b3b2692ee..996e8d029d0 100644
|
||||
goto cleanup;
|
||||
|
||||
if ((status = get_symlink_properties( unix_src, unix_dest, &unix_dest_len, &buffer->ReparseTag,
|
||||
@@ -6465,7 +6466,7 @@ NTSTATUS remove_reparse_point(HANDLE handle, REPARSE_GUID_DATA_BUFFER *buffer)
|
||||
@@ -6457,7 +6458,7 @@ NTSTATUS remove_reparse_point(HANDLE handle, REPARSE_GUID_DATA_BUFFER *buffer)
|
||||
if ((status = server_get_unix_fd( handle, FILE_SPECIAL_ACCESS, &dest_fd, &needs_close, NULL, NULL )))
|
||||
return status;
|
||||
|
||||
@ -94,7 +94,7 @@ index e1b3b2692ee..996e8d029d0 100644
|
||||
goto cleanup;
|
||||
|
||||
TRACE( "Deleting symlink %s\n", unix_name );
|
||||
@@ -7559,7 +7560,7 @@ NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_clas
|
||||
@@ -7564,7 +7565,7 @@ NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_clas
|
||||
|
||||
/* first try as a file object */
|
||||
|
||||
@ -104,10 +104,10 @@ index e1b3b2692ee..996e8d029d0 100644
|
||||
if (!(status = unix_to_nt_file_name( unix_name, &nt_name )))
|
||||
{
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index 4ef3c673268..dfab2e71f27 100644
|
||||
index c8fa494caf9..525b13cbfc6 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -2798,11 +2798,12 @@ DECL_HANDLER(get_handle_unix_name)
|
||||
@@ -2849,11 +2849,12 @@ DECL_HANDLER(get_handle_unix_name)
|
||||
|
||||
if ((fd = get_handle_fd_obj( current->process, req->handle, 0 )))
|
||||
{
|
||||
@ -124,10 +124,10 @@ index 4ef3c673268..dfab2e71f27 100644
|
||||
}
|
||||
else set_error( STATUS_OBJECT_TYPE_MISMATCH );
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index abfd6d70240..af6424590dc 100644
|
||||
index 133d6ad0552..126baf0073c 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -1334,6 +1334,7 @@ enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
|
||||
@@ -1339,6 +1339,7 @@ enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
|
||||
/* Get the Unix name from a file handle */
|
||||
@REQ(get_handle_unix_name)
|
||||
obj_handle_t handle; /* file handle */
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 231cc5f69845313256722c5e9736acad5ccef279 Mon Sep 17 00:00:00 2001
|
||||
From 7409071308f81f0a82f09c0d1e0133b6c7d94fa1 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Mon, 23 Nov 2020 13:08:02 -0700
|
||||
Subject: [PATCH] ntdll: Succeed with no data for NtReadFile on reparse points.
|
||||
@ -11,10 +11,10 @@ Subject: [PATCH] ntdll: Succeed with no data for NtReadFile on reparse points.
|
||||
4 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 6e5082980bf..c94a112b23b 100644
|
||||
index ebed2600920..cb9a9506aba 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5492,7 +5492,7 @@ static void test_reparse_points(void)
|
||||
@@ -5581,7 +5581,7 @@ static void test_reparse_points(void)
|
||||
ok(handle != INVALID_HANDLE_VALUE, "Failed to open symlink file.\n");
|
||||
todo_wine ok(GetFileSize(handle, NULL) == 0, "symlink size is not zero\n");
|
||||
bret = ReadFile(handle, &buf, sizeof(buf), &dwLen, NULL);
|
||||
@ -24,10 +24,10 @@ index 6e5082980bf..c94a112b23b 100644
|
||||
CloseHandle(handle);
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 996e8d029d0..8a4dfe9a34b 100644
|
||||
index 4c0e864a011..a4bc4cd5898 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -5436,6 +5436,11 @@ NTSTATUS WINAPI NtReadFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, vo
|
||||
@@ -5424,6 +5424,11 @@ NTSTATUS WINAPI NtReadFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, vo
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
@ -52,10 +52,10 @@ index aff4d9e09e1..53c694177df 100644
|
||||
if (S_ISDIR(file->mode)) return FD_TYPE_DIR;
|
||||
return FD_TYPE_CHAR;
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index af6424590dc..edfd4cf88d5 100644
|
||||
index 126baf0073c..43533b77143 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -1354,6 +1354,7 @@ enum server_fd_type
|
||||
@@ -1359,6 +1359,7 @@ enum server_fd_type
|
||||
{
|
||||
FD_TYPE_INVALID, /* invalid file (no associated fd) */
|
||||
FD_TYPE_FILE, /* regular file */
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c2da4e7418c498619f5e8432bccd2c32a8c97f5c Mon Sep 17 00:00:00 2001
|
||||
From 20d3ffb9cfb71408f424fb4c2e760572f40c8846 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Wed, 25 Nov 2020 09:05:51 -0700
|
||||
Subject: [PATCH] ntdll: Support reparse point properties in fd_get_file_info.
|
||||
@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Support reparse point properties in fd_get_file_info.
|
||||
2 files changed, 20 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index c94a112b23b..b407d0ed18d 100644
|
||||
index cb9a9506aba..cde3b86ade2 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5490,7 +5490,7 @@ static void test_reparse_points(void)
|
||||
@@ -5579,7 +5579,7 @@ static void test_reparse_points(void)
|
||||
handle = CreateFileW(reparse_path, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING,
|
||||
FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0);
|
||||
ok(handle != INVALID_HANDLE_VALUE, "Failed to open symlink file.\n");
|
||||
@ -22,7 +22,7 @@ index c94a112b23b..b407d0ed18d 100644
|
||||
ok(bret, "Failed to read data from the symlink.\n");
|
||||
ok(dwLen == 0, "Length of symlink data is not zero.\n");
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 8a4dfe9a34b..0a35044f739 100644
|
||||
index a4bc4cd5898..f275c36819e 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -1606,7 +1606,7 @@ static inline int get_file_xattr( char *hexattr, int attrlen )
|
||||
@ -67,7 +67,7 @@ index 8a4dfe9a34b..0a35044f739 100644
|
||||
st->st_mode = (st->st_mode & ~S_IFMT) | (is_dir ? S_IFDIR : S_IFREG);
|
||||
}
|
||||
else if (S_ISDIR( st->st_mode ) && (parent_path = malloc( strlen(path) + 4 )))
|
||||
@@ -6249,7 +6261,7 @@ cleanup:
|
||||
@@ -6241,7 +6253,7 @@ cleanup:
|
||||
}
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ index 8a4dfe9a34b..0a35044f739 100644
|
||||
DWORD *tag, ULONG *flags, BOOL *is_dir)
|
||||
{
|
||||
int len = MAX_PATH;
|
||||
@@ -6265,7 +6277,7 @@ NTSTATUS get_symlink_properties(const char *unix_src, char *unix_dest, int *unix
|
||||
@@ -6257,7 +6269,7 @@ NTSTATUS get_symlink_properties(const char *unix_src, char *unix_dest, int *unix
|
||||
tmp = malloc( len );
|
||||
else
|
||||
tmp = unix_dest;
|
||||
@ -85,7 +85,7 @@ index 8a4dfe9a34b..0a35044f739 100644
|
||||
{
|
||||
status = errno_to_status( errno );
|
||||
goto cleanup;
|
||||
@@ -6356,8 +6368,8 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6348,8 +6360,8 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
if ((status = server_get_unix_name( handle, &unix_src, TRUE )))
|
||||
goto cleanup;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 906233fe177919711b247c7e8e6be7b4a70370d6 Mon Sep 17 00:00:00 2001
|
||||
From 9383c4e7c2f5862cdaa05f01f5591212f988d6df Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Wed, 25 Nov 2020 09:19:42 -0700
|
||||
Subject: [PATCH] ntdll: Add support for FileAttributeTagInformation.
|
||||
@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Add support for FileAttributeTagInformation.
|
||||
2 files changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index b407d0ed18d..47df69541c3 100644
|
||||
index cde3b86ade2..18887895e40 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5297,6 +5297,7 @@ static void test_reparse_points(void)
|
||||
@@ -5386,6 +5386,7 @@ static void test_reparse_points(void)
|
||||
static WCHAR volW[] = {'c',':','\\',0};
|
||||
REPARSE_GUID_DATA_BUFFER guid_buffer;
|
||||
static const WCHAR dotW[] = {'.',0};
|
||||
@ -20,7 +20,7 @@ index b407d0ed18d..47df69541c3 100644
|
||||
REPARSE_DATA_BUFFER *buffer = NULL;
|
||||
DWORD dwret, dwLen, dwFlags, err;
|
||||
WIN32_FILE_ATTRIBUTE_DATA fad;
|
||||
@@ -5305,6 +5306,7 @@ static void test_reparse_points(void)
|
||||
@@ -5394,6 +5395,7 @@ static void test_reparse_points(void)
|
||||
IO_STATUS_BLOCK iosb;
|
||||
UNICODE_STRING nameW;
|
||||
TOKEN_PRIVILEGES tp;
|
||||
@ -28,7 +28,7 @@ index b407d0ed18d..47df69541c3 100644
|
||||
WCHAR *dest;
|
||||
LUID luid;
|
||||
BOOL bret;
|
||||
@@ -5494,6 +5496,10 @@ static void test_reparse_points(void)
|
||||
@@ -5583,6 +5585,10 @@ static void test_reparse_points(void)
|
||||
bret = ReadFile(handle, &buf, sizeof(buf), &dwLen, NULL);
|
||||
ok(bret, "Failed to read data from the symlink.\n");
|
||||
ok(dwLen == 0, "Length of symlink data is not zero.\n");
|
||||
@ -40,10 +40,10 @@ index b407d0ed18d..47df69541c3 100644
|
||||
|
||||
/* Check the size/data of the symlink target */
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 0a35044f739..66c8b98a20a 100644
|
||||
index f275c36819e..26d482638cc 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -4533,7 +4533,9 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
|
||||
@@ -4552,7 +4552,9 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
|
||||
{
|
||||
FILE_ATTRIBUTE_TAG_INFORMATION *info = ptr;
|
||||
info->FileAttributes = attr;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2bd2870ade6cd8b048ca93a90670c744142ff3f5 Mon Sep 17 00:00:00 2001
|
||||
From 95841ecb8dce655e76e90276c38a9ea4bab47d18 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 13 Mar 2019 16:02:05 -0600
|
||||
Subject: [PATCH] kernel32: Implement CreateSymbolicLink[A|W] with ntdll
|
||||
@ -282,7 +282,7 @@ index 80497c1ac97..68de99a2516 100644
|
||||
|
||||
|
||||
diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c
|
||||
index 35e90cfa29c..552a1de81cb 100644
|
||||
index 495ee9dd6fb..c982be0c10e 100644
|
||||
--- a/dlls/msvcp120/tests/msvcp120.c
|
||||
+++ b/dlls/msvcp120/tests/msvcp120.c
|
||||
@@ -1609,15 +1609,14 @@ static void test_tr2_sys__Stat(void)
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 67ee6190599a8d820f333910b7a365d3fc255e29 Mon Sep 17 00:00:00 2001
|
||||
From 3d4e45425405324ac5ac7716c7efb399e0e239fe Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 29 May 2019 15:11:42 -0600
|
||||
Subject: [PATCH] kernel32: Add reparse support to FindNextFile.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From babea30f268f9c25429cd441499aa6c27e9313c1 Mon Sep 17 00:00:00 2001
|
||||
From 599164cd8f25f0ca4ebd4aaa0082148aa7d28305 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 29 May 2019 15:18:50 -0600
|
||||
Subject: [PATCH] wcmd: Display reparse point type in directory listings.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c36ba7d9de06abcbacdca63cdabdb2b91a17a0fb Mon Sep 17 00:00:00 2001
|
||||
From 6c096dfae64576b5b4e9b234ba11652218ece159 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 29 May 2019 15:38:30 -0600
|
||||
Subject: [PATCH] wcmd: Show reparse point target in directory listing.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c54be21fe819e7bb157a0a0edc3f9a3d3636d765 Mon Sep 17 00:00:00 2001
|
||||
From 884a569d5fbfb51a5e0d734a47c23e4864dbfa72 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 29 May 2019 16:01:45 -0600
|
||||
Subject: [PATCH] wcmd: Add junction point support to mklink.
|
||||
@ -9,7 +9,7 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
1 file changed, 47 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
|
||||
index 502694ffc46..bb1a5578911 100644
|
||||
index c7df724ae00..18c8197f369 100644
|
||||
--- a/programs/cmd/builtins.c
|
||||
+++ b/programs/cmd/builtins.c
|
||||
@@ -31,6 +31,9 @@
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 68254807f957ad327c12c8bfaf6b5dcfad9a4efd Mon Sep 17 00:00:00 2001
|
||||
From f097a3e32d4c262f3cb44bbbca652b743526d951 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Sat, 6 Feb 2021 12:17:23 -0700
|
||||
Subject: [PATCH] server: Properly handle renames involving symlinks.
|
||||
@ -8,10 +8,10 @@ Subject: [PATCH] server: Properly handle renames involving symlinks.
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index dfab2e71f27..c7c4ad280ef 100644
|
||||
index 525b13cbfc6..a43cc033f02 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -2631,7 +2631,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
|
||||
@@ -2645,7 +2645,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
|
||||
goto failed;
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@ index dfab2e71f27..c7c4ad280ef 100644
|
||||
{
|
||||
if (!fstat( fd->unix_fd, &st2 ) && st.st_ino == st2.st_ino && st.st_dev == st2.st_dev)
|
||||
{
|
||||
@@ -2647,7 +2647,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
|
||||
@@ -2661,7 +2661,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
|
||||
}
|
||||
|
||||
/* can't replace directories or special files */
|
||||
@ -29,9 +29,9 @@ index dfab2e71f27..c7c4ad280ef 100644
|
||||
{
|
||||
set_error( STATUS_ACCESS_DENIED );
|
||||
goto failed;
|
||||
@@ -2706,6 +2706,8 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
|
||||
free( fd->unlink_name );
|
||||
@@ -2721,6 +2721,8 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
|
||||
free( fd->unix_name );
|
||||
fd->closed->unlink_name = fd->unlink_name = name;
|
||||
fd->closed->unix_name = fd->unix_name = realpath( name, NULL );
|
||||
+ if (!fd->unix_name)
|
||||
+ fd->closed->unix_name = fd->unix_name = dup_fd_name( NULL, name ); /* dangling symlink */
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 697dae8422849f3adadf523b9fa20f7db21739f8 Mon Sep 17 00:00:00 2001
|
||||
From 82001304e8f4c91106036c9e166fc88add3197fe 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: Use FILE_OPEN_REPARSE_POINT in
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 7150cb17fa6b349530dea3a808c8cfbd55acc16c Mon Sep 17 00:00:00 2001
|
||||
From 5b4684487296a767a8c4c7ab6da662d909dc1fd2 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Sat, 6 Feb 2021 12:52:51 -0700
|
||||
Subject: [PATCH] kernelbase: Use FILE_OPEN_REPARSE_POINT in DeleteFile.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ebba56121b254c640ef9fb9b2888bc9b08062080 Mon Sep 17 00:00:00 2001
|
||||
From be43222b39420cff283ac52b8ae5a6781c42e701 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Sat, 6 Feb 2021 16:32:44 -0700
|
||||
Subject: [PATCH] ntdll: Treat undecoded unix symlinks as WSL Linux/Unix
|
||||
@ -11,10 +11,10 @@ Subject: [PATCH] ntdll: Treat undecoded unix symlinks as WSL Linux/Unix
|
||||
3 files changed, 41 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 66c8b98a20a..62593fa8526 100644
|
||||
index 26d482638cc..ec4188a1c8c 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -6266,9 +6266,10 @@ cleanup:
|
||||
@@ -6258,9 +6258,10 @@ cleanup:
|
||||
NTSTATUS get_symlink_properties(int fd, const char *unix_src, char *unix_dest, int *unix_dest_len,
|
||||
DWORD *tag, ULONG *flags, BOOL *is_dir)
|
||||
{
|
||||
@ -26,7 +26,7 @@ index 66c8b98a20a..62593fa8526 100644
|
||||
BOOL dir_flag;
|
||||
char *p, *tmp;
|
||||
ssize_t ret;
|
||||
@@ -6295,10 +6296,7 @@ NTSTATUS get_symlink_properties(int fd, const char *unix_src, char *unix_dest, i
|
||||
@@ -6287,10 +6288,7 @@ NTSTATUS get_symlink_properties(int fd, const char *unix_src, char *unix_dest, i
|
||||
p++;
|
||||
}
|
||||
if (*p++ != '/')
|
||||
@ -38,7 +38,7 @@ index 66c8b98a20a..62593fa8526 100644
|
||||
reparse_tag = 0;
|
||||
for (i = 0; i < sizeof(ULONG)*8; i++)
|
||||
{
|
||||
@@ -6310,10 +6308,7 @@ NTSTATUS get_symlink_properties(int fd, const char *unix_src, char *unix_dest, i
|
||||
@@ -6302,10 +6300,7 @@ NTSTATUS get_symlink_properties(int fd, const char *unix_src, char *unix_dest, i
|
||||
else if (c == '.' && *p++ == '/')
|
||||
val = 1;
|
||||
else
|
||||
@ -50,7 +50,7 @@ index 66c8b98a20a..62593fa8526 100644
|
||||
reparse_tag |= (val << i);
|
||||
}
|
||||
/* skip past the directory/file flag */
|
||||
@@ -6326,19 +6321,31 @@ NTSTATUS get_symlink_properties(int fd, const char *unix_src, char *unix_dest, i
|
||||
@@ -6318,19 +6313,31 @@ NTSTATUS get_symlink_properties(int fd, const char *unix_src, char *unix_dest, i
|
||||
else if (c == '.' && *p++ == '/')
|
||||
dir_flag = TRUE;
|
||||
else
|
||||
@ -87,7 +87,7 @@ index 66c8b98a20a..62593fa8526 100644
|
||||
|
||||
cleanup:
|
||||
if (!unix_dest) free( tmp );
|
||||
@@ -6352,9 +6359,9 @@ cleanup:
|
||||
@@ -6344,9 +6351,9 @@ cleanup:
|
||||
*/
|
||||
NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out_size)
|
||||
{
|
||||
@ -98,7 +98,7 @@ index 66c8b98a20a..62593fa8526 100644
|
||||
SIZE_T nt_dest_len = PATH_MAX;
|
||||
int unix_dest_len = PATH_MAX;
|
||||
BOOL dest_allocated = FALSE;
|
||||
@@ -6419,6 +6426,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6411,6 +6418,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
{
|
||||
case IO_REPARSE_TAG_MOUNT_POINT:
|
||||
max_length = out_size-FIELD_OFFSET(typeof(*buffer), MountPointReparseBuffer.PathBuffer[1]);
|
||||
@ -106,7 +106,7 @@ index 66c8b98a20a..62593fa8526 100644
|
||||
path_len = 0;
|
||||
buffer->MountPointReparseBuffer.SubstituteNameOffset = path_len;
|
||||
buffer->MountPointReparseBuffer.SubstituteNameLength = nt_dest_len;
|
||||
@@ -6432,6 +6440,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6424,6 +6432,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
break;
|
||||
case IO_REPARSE_TAG_SYMLINK:
|
||||
max_length = out_size-FIELD_OFFSET(typeof(*buffer), SymbolicLinkReparseBuffer.PathBuffer[1]);
|
||||
@ -114,7 +114,7 @@ index 66c8b98a20a..62593fa8526 100644
|
||||
path_len = 0;
|
||||
buffer->SymbolicLinkReparseBuffer.SubstituteNameOffset = path_len;
|
||||
buffer->SymbolicLinkReparseBuffer.SubstituteNameLength = nt_dest_len;
|
||||
@@ -6445,19 +6454,20 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6437,19 +6446,20 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
buffer->SymbolicLinkReparseBuffer.Flags = flags;
|
||||
break;
|
||||
default:
|
||||
@ -162,10 +162,10 @@ index 0d02225bc4f..25af12a413a 100644
|
||||
UCHAR DataBuffer[1];
|
||||
} GenericReparseBuffer;
|
||||
diff --git a/include/winnt.h b/include/winnt.h
|
||||
index 0843ee3f739..52a4825781c 100644
|
||||
index b83f588a16d..56baca5a0dd 100644
|
||||
--- a/include/winnt.h
|
||||
+++ b/include/winnt.h
|
||||
@@ -2877,6 +2877,7 @@ extern struct _TEB * WINAPI NtCurrentTeb(void);
|
||||
@@ -2226,6 +2226,7 @@ extern struct _TEB * WINAPI NtCurrentTeb(void);
|
||||
#define IO_REPARSE_TAG_CLOUD_MASK __MSABI_LONG(0x0000F000)
|
||||
#define IO_REPARSE_TAG_APPEXECLINK __MSABI_LONG(0x8000001B)
|
||||
#define IO_REPARSE_TAG_GVFS __MSABI_LONG(0x9000001C)
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 54b8792b895c7aaa3c2795fb9293187493b8766e Mon Sep 17 00:00:00 2001
|
||||
From dd5c6b79e5acb821669af1a99d822a37a6cbe1bd Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Mon, 3 May 2021 09:28:08 -0600
|
||||
Subject: [PATCH] ntdll: Add support for creating Unix/Linux symlinks.
|
||||
@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Add support for creating Unix/Linux symlinks.
|
||||
2 files changed, 65 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 47df69541c3..eadd5922f32 100644
|
||||
index 18887895e40..bff3b18ce83 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5301,7 +5301,9 @@ static void test_reparse_points(void)
|
||||
@@ -5390,7 +5390,9 @@ static void test_reparse_points(void)
|
||||
REPARSE_DATA_BUFFER *buffer = NULL;
|
||||
DWORD dwret, dwLen, dwFlags, err;
|
||||
WIN32_FILE_ATTRIBUTE_DATA fad;
|
||||
@ -22,7 +22,7 @@ index 47df69541c3..eadd5922f32 100644
|
||||
HANDLE handle, token;
|
||||
IO_STATUS_BLOCK iosb;
|
||||
UNICODE_STRING nameW;
|
||||
@@ -5647,6 +5649,47 @@ static void test_reparse_points(void)
|
||||
@@ -5736,6 +5738,47 @@ static void test_reparse_points(void)
|
||||
wine_dbgstr_w(dest), wine_dbgstr_w(&targetW[1]));
|
||||
CloseHandle(handle);
|
||||
|
||||
@ -71,10 +71,10 @@ index 47df69541c3..eadd5922f32 100644
|
||||
/* Cleanup */
|
||||
pRtlFreeUnicodeString(&nameW);
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 62593fa8526..e3c21bcbc66 100644
|
||||
index ec4188a1c8c..31b64cbaabe 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -6049,18 +6049,18 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6041,18 +6041,18 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
{
|
||||
BOOL src_allocated = FALSE, path_allocated = FALSE, dest_allocated = FALSE;
|
||||
BOOL nt_dest_allocated = FALSE, tempdir_created = FALSE;
|
||||
@ -96,7 +96,7 @@ index 62593fa8526..e3c21bcbc66 100644
|
||||
ULONG flags;
|
||||
int i;
|
||||
|
||||
@@ -6078,6 +6078,12 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6070,6 +6070,12 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
dest = &buffer->SymbolicLinkReparseBuffer.PathBuffer[offset];
|
||||
flags = buffer->SymbolicLinkReparseBuffer.Flags;
|
||||
break;
|
||||
@ -109,7 +109,7 @@ index 62593fa8526..e3c21bcbc66 100644
|
||||
default:
|
||||
FIXME("stub: FSCTL_SET_REPARSE_POINT(%x)\n", buffer->ReparseTag);
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
@@ -6089,6 +6095,9 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6081,6 +6087,9 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
if ((status = server_get_unix_name( handle, &unix_src, FALSE )))
|
||||
goto cleanup;
|
||||
src_allocated = TRUE;
|
||||
@ -119,7 +119,7 @@ index 62593fa8526..e3c21bcbc66 100644
|
||||
if (flags == SYMLINK_FLAG_RELATIVE)
|
||||
{
|
||||
SIZE_T nt_path_len = PATH_MAX, unix_path_len = PATH_MAX;
|
||||
@@ -6164,6 +6173,8 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6156,6 +6165,8 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
if (status != STATUS_SUCCESS && status != STATUS_NO_SUCH_FILE)
|
||||
goto cleanup;
|
||||
dest_allocated = TRUE;
|
||||
@ -128,7 +128,7 @@ index 62593fa8526..e3c21bcbc66 100644
|
||||
/* check that the source and destination paths are the same up to the relative path */
|
||||
if (flags == SYMLINK_FLAG_RELATIVE)
|
||||
{
|
||||
@@ -6179,14 +6190,17 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6171,14 +6182,17 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
|
||||
/* Encode the reparse tag into the symlink */
|
||||
strcpy( magic_dest, "" );
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 96096532f7ec6e1fb58ec5216995c944d4d7c2f6 Mon Sep 17 00:00:00 2001
|
||||
From ae8bab9e6096fc775a9e616c8661626a278be4b8 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Sat, 6 Feb 2021 16:15:46 -0700
|
||||
Subject: [PATCH] ntdll: Strip the wine prefix from reparse point paths
|
||||
@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Strip the wine prefix from reparse point paths
|
||||
1 file changed, 29 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index e3c21bcbc66..346e1e8c84c 100644
|
||||
index 31b64cbaabe..8ca19497c64 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -6041,6 +6041,33 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer,
|
||||
@@ -6033,6 +6033,33 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer,
|
||||
}
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ index e3c21bcbc66..346e1e8c84c 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.
|
||||
@@ -6185,6 +6212,8 @@ have_dest:
|
||||
@@ -6177,6 +6204,8 @@ have_dest:
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5952a53690460f2bafac92f10dfeee15aaa709c1 Mon Sep 17 00:00:00 2001
|
||||
From 2ff81d88c65aec422390f6099b92c37d3a8e623c Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Sat, 6 Feb 2021 16:16:17 -0700
|
||||
Subject: [PATCH] ntdll: Add a marker to reparse point paths to indicate the
|
||||
@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Add a marker to reparse point paths to indicate the
|
||||
1 file changed, 23 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 346e1e8c84c..325ac6ed8a1 100644
|
||||
index 8ca19497c64..806b7b4465e 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -6068,6 +6068,26 @@ void strip_external_path( char *path, SIZE_T *len )
|
||||
@@ -6060,6 +6060,26 @@ void strip_external_path( char *path, SIZE_T *len )
|
||||
}
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ index 346e1e8c84c..325ac6ed8a1 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.
|
||||
@@ -6213,7 +6233,10 @@ have_dest:
|
||||
@@ -6205,7 +6225,10 @@ have_dest:
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1,4 +1,4 @@
|
||||
From dc74c7a174aac20be96cf40914bc4927256eac47 Mon Sep 17 00:00:00 2001
|
||||
From c1b5b6a205239efd567449dafa2bd8ec39178a1e Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Sat, 6 Feb 2021 16:15:03 -0700
|
||||
Subject: [PATCH] server: Rewrite absolute reparse point targets if the prefix
|
||||
@ -9,10 +9,10 @@ Subject: [PATCH] server: Rewrite absolute reparse point targets if the prefix
|
||||
1 file changed, 69 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index c7c4ad280ef..d795080cfda 100644
|
||||
index a43cc033f02..1f7ba38651b 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -1902,23 +1902,16 @@ void get_nt_name( struct fd *fd, struct unicode_str *name )
|
||||
@@ -1899,23 +1899,16 @@ void get_nt_name( struct fd *fd, struct unicode_str *name )
|
||||
name->len = fd->nt_namelen;
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ index c7c4ad280ef..d795080cfda 100644
|
||||
link[len] = 0;
|
||||
p = link;
|
||||
/* skip past relative/absolute indication */
|
||||
@@ -1926,7 +1919,7 @@ static void decode_symlink(char *name, int *is_dir)
|
||||
@@ -1923,7 +1916,7 @@ static void decode_symlink(char *name, int *is_dir)
|
||||
p++;
|
||||
if (*p++ != '/')
|
||||
{
|
||||
@ -49,7 +49,7 @@ index c7c4ad280ef..d795080cfda 100644
|
||||
}
|
||||
/* decode the reparse tag */
|
||||
reparse_tag = 0;
|
||||
@@ -1940,7 +1933,7 @@ static void decode_symlink(char *name, int *is_dir)
|
||||
@@ -1937,7 +1930,7 @@ static void decode_symlink(char *name, int *is_dir)
|
||||
else if (c == '.' && *p++ == '/')
|
||||
val = 1;
|
||||
else
|
||||
@ -58,7 +58,7 @@ index c7c4ad280ef..d795080cfda 100644
|
||||
reparse_tag |= (val << i);
|
||||
}
|
||||
/* decode the directory/file flag */
|
||||
@@ -1953,10 +1946,70 @@ static void decode_symlink(char *name, int *is_dir)
|
||||
@@ -1950,10 +1943,70 @@ static void decode_symlink(char *name, int *is_dir)
|
||||
else if (c == '.' && *p++ == '/')
|
||||
*is_dir = TRUE;
|
||||
else
|
||||
@ -130,7 +130,7 @@ index c7c4ad280ef..d795080cfda 100644
|
||||
}
|
||||
|
||||
/* open() wrapper that returns a struct fd with no fd user set */
|
||||
@@ -2022,7 +2075,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -2019,7 +2072,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
fd->unix_name = NULL;
|
||||
if ((path = dup_fd_name( root, name )))
|
||||
{
|
||||
@ -139,7 +139,7 @@ index c7c4ad280ef..d795080cfda 100644
|
||||
#if defined(O_SYMLINK)
|
||||
if (is_symlink && (options & FILE_OPEN_REPARSE_POINT) && !(flags & O_CREAT))
|
||||
flags |= O_SYMLINK;
|
||||
@@ -2082,7 +2135,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -2079,7 +2132,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
*mode = st.st_mode;
|
||||
is_dir = S_ISDIR(st.st_mode);
|
||||
if (is_link)
|
||||
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "10fb33026f2a55209dea0fb00caa279610027a0f"
|
||||
echo "7bedd313c88d7b1fd4fe7b04c20bb0ec91605cac"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
Loading…
Reference in New Issue
Block a user