mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Updated ntdll-Junction_Points patchset
This commit is contained in:
parent
0ed3e9c774
commit
24753f8756
@ -1,7 +1,7 @@
|
||||
From 763a8ab7171aebda0db3024e956aaa365b4446b4 Mon Sep 17 00:00:00 2001
|
||||
From dfe3430017b0ed0f911598a07bc7ccf8de574077 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.
|
||||
Subject: ntdll: Add support for junction point creation.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@ -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 97555befb4c..14fb5679a82 100644
|
||||
index bb26503dfd4..9e113d939ec 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1962,6 +1962,8 @@ AC_CHECK_FUNCS(\
|
||||
@@ -2027,6 +2027,8 @@ AC_CHECK_FUNCS(\
|
||||
prctl \
|
||||
proc_pidinfo \
|
||||
sched_yield \
|
||||
@ -357,10 +357,10 @@ index 689b943a5b1..dd7ab59de67 100644
|
||||
TRACE("FSCTL_SET_SPARSE: Ignoring request\n");
|
||||
io->Information = 0;
|
||||
diff --git a/include/Makefile.in b/include/Makefile.in
|
||||
index 756e25dcc82..5a0929633f3 100644
|
||||
index c99b0e1e1c1..973b5a52569 100644
|
||||
--- a/include/Makefile.in
|
||||
+++ b/include/Makefile.in
|
||||
@@ -549,6 +549,7 @@ SOURCES = \
|
||||
@@ -551,6 +551,7 @@ SOURCES = \
|
||||
ntdef.h \
|
||||
ntdsapi.h \
|
||||
ntgdi.h \
|
||||
@ -417,5 +417,5 @@ index 00000000000..21d42e17325
|
||||
+
|
||||
+#endif /* __WINE_NTIFS_H */
|
||||
--
|
||||
2.33.0
|
||||
2.17.1
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
From cfcae7fcb7243890a6b5c7f3397313ca894b19be Mon Sep 17 00:00:00 2001
|
||||
From 2253ea0333a80d04657da9018023c28b036ecfa5 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.
|
||||
Subject: ntdll: Add support for reading junction points.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
dlls/ntdll/tests/file.c | 20 ++++++-
|
||||
dlls/ntdll/unix/file.c | 125 ++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 144 insertions(+), 1 deletion(-)
|
||||
dlls/ntdll/unix/file.c | 129 ++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 148 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 7a01e947e13..3b7746650f3 100644
|
||||
@ -55,10 +55,10 @@ index 7a01e947e13..3b7746650f3 100644
|
||||
|
||||
cleanup:
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index f6c23f629b8..c6c4df8dba3 100644
|
||||
index dd7ab59de67..3b4b1cac833 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -6084,6 +6084,125 @@ cleanup:
|
||||
@@ -6074,6 +6074,127 @@ cleanup:
|
||||
}
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ index f6c23f629b8..c6c4df8dba3 100644
|
||||
+ * Retrieve the unix name corresponding to a file handle and use that to find the destination of the
|
||||
+ * symlink corresponding to that file handle.
|
||||
+ */
|
||||
+NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out_size)
|
||||
+NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG *size)
|
||||
+{
|
||||
+ char *unix_src, unix_dest[PATH_MAX];
|
||||
+ INT prefix_len, path_len, total_len;
|
||||
@ -74,6 +74,7 @@ index f6c23f629b8..c6c4df8dba3 100644
|
||||
+ SIZE_T nt_dest_len = PATH_MAX;
|
||||
+ BOOL dest_allocated = FALSE;
|
||||
+ int dest_fd, needs_close;
|
||||
+ ULONG out_size = *size;
|
||||
+ int unix_dest_len;
|
||||
+ DWORD max_length;
|
||||
+ NTSTATUS status;
|
||||
@ -171,6 +172,7 @@ index f6c23f629b8..c6c4df8dba3 100644
|
||||
+
|
||||
+ memcpy( subst_name, nt_dest, nt_dest_len );
|
||||
+ memcpy( print_name, &nt_dest[prefix_len], nt_dest_len - prefix_len*sizeof(WCHAR) );
|
||||
+ *size = total_len;
|
||||
+ buffer->ReparseDataLength = total_len - FIELD_OFFSET(typeof(*buffer), GenericReparseBuffer);
|
||||
+ status = STATUS_SUCCESS;
|
||||
+
|
||||
@ -184,19 +186,21 @@ index f6c23f629b8..c6c4df8dba3 100644
|
||||
/******************************************************************************
|
||||
* NtFsControlFile (NTDLL.@)
|
||||
*/
|
||||
@@ -6166,6 +6285,12 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
@@ -6156,6 +6277,14 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
break;
|
||||
}
|
||||
|
||||
+ case FSCTL_GET_REPARSE_POINT:
|
||||
+ {
|
||||
+ REPARSE_DATA_BUFFER *buffer = (REPARSE_DATA_BUFFER *)out_buffer;
|
||||
+ status = get_reparse_point( handle, buffer, out_size );
|
||||
+ ULONG size = out_size;
|
||||
+ status = get_reparse_point( handle, buffer, &size );
|
||||
+ io->Information = size;
|
||||
+ break;
|
||||
+ }
|
||||
case FSCTL_SET_REPARSE_POINT:
|
||||
{
|
||||
REPARSE_DATA_BUFFER *buffer = (REPARSE_DATA_BUFFER *)in_buffer;
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 882f91cd59e014e985c58fc36f6dc2b2a5679bf8 Mon Sep 17 00:00:00 2001
|
||||
From 0eece31261dab2d05c3d9e23138d87a0495f5cbb 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.
|
||||
Subject: ntdll: Add support for deleting junction points.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@ -71,10 +71,10 @@ index 3b7746650f3..0031f49693c 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 c6c4df8dba3..c6cdf54a061 100644
|
||||
index 3b4b1cac833..79cf0f2dbca 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -6203,6 +6203,87 @@ cleanup:
|
||||
@@ -6195,6 +6195,87 @@ cleanup:
|
||||
}
|
||||
|
||||
|
||||
@ -162,7 +162,7 @@ index c6c4df8dba3..c6cdf54a061 100644
|
||||
/******************************************************************************
|
||||
* NtFsControlFile (NTDLL.@)
|
||||
*/
|
||||
@@ -6285,6 +6366,22 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
@@ -6277,6 +6358,22 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
break;
|
||||
}
|
||||
|
||||
@ -207,5 +207,5 @@ index 21d42e17325..4539b89d583 100644
|
||||
+
|
||||
#endif /* __WINE_NTIFS_H */
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 233e652467335f4d618de1a68d7f39ac0c9bbcfd Mon Sep 17 00:00:00 2001
|
||||
From a8d8375757d1736dca6f4c7a185e766fbe513bd0 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.
|
||||
Subject: ntdll: Add a test for junction point advertisement.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@ -25,5 +25,5 @@ index 0031f49693c..521857575d8 100644
|
||||
HeapFree(GetProcessHeap(), 0, buffer);
|
||||
buffer_len = sizeof(*buffer) + MAX_PATH*sizeof(WCHAR);
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 65dd6d4aa01884b7119cca1defe31b23c248f719 Mon Sep 17 00:00:00 2001
|
||||
From 6eb3781353711b7a31ef5cc391cf7431e3f77640 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
|
||||
Subject: server: Add support for deleting junction points with
|
||||
RemoveDirectory.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
@ -63,10 +63,10 @@ index 521857575d8..c5b3b83802e 100644
|
||||
/* Cleanup */
|
||||
pRtlFreeUnicodeString(&nameW);
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index b953da2ab85..2adadceae25 100644
|
||||
index c9a21186722..ce1c47d58a9 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -169,7 +169,8 @@ struct closed_fd
|
||||
@@ -163,7 +163,8 @@ struct closed_fd
|
||||
struct list entry; /* entry in inode closed list */
|
||||
int unix_fd; /* the unix file descriptor */
|
||||
int unlink; /* whether to unlink on close: -1 - implicit FILE_DELETE_ON_CLOSE, 1 - explicit disposition */
|
||||
@ -76,7 +76,7 @@ index b953da2ab85..2adadceae25 100644
|
||||
};
|
||||
|
||||
struct fd
|
||||
@@ -184,6 +185,7 @@ struct fd
|
||||
@@ -178,6 +179,7 @@ struct fd
|
||||
unsigned int access; /* file access (FILE_READ_DATA etc.) */
|
||||
unsigned int options; /* file options (FILE_DELETE_ON_CLOSE, FILE_SYNCHRONOUS...) */
|
||||
unsigned int sharing; /* file sharing mode */
|
||||
@ -84,7 +84,7 @@ index b953da2ab85..2adadceae25 100644
|
||||
char *unix_name; /* unix file name */
|
||||
WCHAR *nt_name; /* NT file name */
|
||||
data_size_t nt_namelen; /* length of NT file name */
|
||||
@@ -1118,6 +1120,7 @@ static void inode_close_pending( struct inode *inode, int keep_unlinks )
|
||||
@@ -1125,6 +1127,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 b953da2ab85..2adadceae25 100644
|
||||
free( fd->unix_name );
|
||||
free( fd );
|
||||
}
|
||||
@@ -1152,12 +1155,13 @@ static void inode_destroy( struct object *obj )
|
||||
@@ -1159,12 +1162,13 @@ static void inode_destroy( struct object *obj )
|
||||
{
|
||||
/* make sure it is still the same file */
|
||||
struct stat st;
|
||||
@ -109,7 +109,7 @@ index b953da2ab85..2adadceae25 100644
|
||||
free( fd->unix_name );
|
||||
free( fd );
|
||||
}
|
||||
@@ -1578,6 +1582,7 @@ static void fd_destroy( struct object *obj )
|
||||
@@ -1585,6 +1589,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 b953da2ab85..2adadceae25 100644
|
||||
free( fd->unix_name );
|
||||
}
|
||||
}
|
||||
@@ -1687,6 +1692,7 @@ static struct fd *alloc_fd_object(void)
|
||||
@@ -1694,6 +1699,7 @@ static struct fd *alloc_fd_object(void)
|
||||
fd->options = 0;
|
||||
fd->sharing = 0;
|
||||
fd->unix_fd = -1;
|
||||
@ -125,7 +125,7 @@ index b953da2ab85..2adadceae25 100644
|
||||
fd->unix_name = NULL;
|
||||
fd->nt_name = NULL;
|
||||
fd->nt_namelen = 0;
|
||||
@@ -1724,6 +1730,7 @@ struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *use
|
||||
@@ -1731,6 +1737,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 b953da2ab85..2adadceae25 100644
|
||||
fd->unix_name = NULL;
|
||||
fd->nt_name = NULL;
|
||||
fd->nt_namelen = 0;
|
||||
@@ -1765,6 +1772,12 @@ struct fd *dup_fd_object( struct fd *orig, unsigned int access, unsigned int sha
|
||||
@@ -1772,6 +1779,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 b953da2ab85..2adadceae25 100644
|
||||
if (orig->inode)
|
||||
{
|
||||
struct closed_fd *closed = mem_alloc( sizeof(*closed) );
|
||||
@@ -1777,6 +1790,7 @@ struct fd *dup_fd_object( struct fd *orig, unsigned int access, unsigned int sha
|
||||
@@ -1784,6 +1797,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 b953da2ab85..2adadceae25 100644
|
||||
closed->unix_name = fd->unix_name;
|
||||
fd->closed = closed;
|
||||
fd->inode = (struct inode *)grab_object( orig->inode );
|
||||
@@ -1961,18 +1975,19 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -1968,18 +1982,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 b953da2ab85..2adadceae25 100644
|
||||
{
|
||||
unsigned int err;
|
||||
struct inode *inode = get_inode( st.st_dev, st.st_ino, fd->unix_fd );
|
||||
@@ -1990,6 +2005,9 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -1997,6 +2012,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,7 +187,7 @@ index b953da2ab85..2adadceae25 100644
|
||||
/* check directory options */
|
||||
if ((options & FILE_DIRECTORY_FILE) && !S_ISDIR(st.st_mode))
|
||||
{
|
||||
@@ -2619,10 +2637,11 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
|
||||
@@ -2644,10 +2662,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 );
|
||||
@ -202,5 +202,5 @@ index b953da2ab85..2adadceae25 100644
|
||||
return;
|
||||
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
@ -1,97 +1,213 @@
|
||||
From d8910a4f11afbe0299fffcde6ca34fcfdb86f9c0 Mon Sep 17 00:00:00 2001
|
||||
From 7a2585477f90f5e88a7745eea20f517a00b2175b 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.
|
||||
Subject: kernel32: Advertise junction point support.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
dlls/mountmgr.sys/device.c | 66 +++++++++++++++++++++++++++++++++++++-
|
||||
dlls/ntdll/tests/file.c | 9 ++++--
|
||||
2 files changed, 72 insertions(+), 3 deletions(-)
|
||||
dlls/mountmgr.sys/device.c | 33 ++++++++++++-
|
||||
dlls/mountmgr.sys/unixlib.c | 97 +++++++++++++++++++++++++++++++++++++
|
||||
dlls/mountmgr.sys/unixlib.h | 8 +++
|
||||
dlls/ntdll/tests/file.c | 9 +++-
|
||||
4 files changed, 144 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c
|
||||
index d4f77012bbe..5cb133ebecd 100644
|
||||
index d4f77012bbe..6131e236e3a 100644
|
||||
--- a/dlls/mountmgr.sys/device.c
|
||||
+++ b/dlls/mountmgr.sys/device.c
|
||||
@@ -1615,6 +1615,69 @@ static NTSTATUS query_property( struct disk_device *device, IRP *irp )
|
||||
return status;
|
||||
@@ -197,6 +197,36 @@ static void get_filesystem_serial( struct volume *volume )
|
||||
volume->serial = strtoul( buffer, NULL, 16 );
|
||||
}
|
||||
|
||||
+static DWORD get_fs_flags( struct volume *volume )
|
||||
+/* get the flags for the volume by looking at the type of underlying filesystem */
|
||||
+static DWORD get_filesystem_flags( struct volume *volume )
|
||||
+{
|
||||
+#if 0
|
||||
+/*#if defined(__NR_renameat2) || defined(RENAME_SWAP)*/
|
||||
+ char fstypename[256];
|
||||
+ ULONG size = sizeof(fstypename);
|
||||
+ struct get_volume_filesystem_params params = { volume->device->unix_mount, fstypename, &size };
|
||||
+
|
||||
+ if (!volume->device->unix_mount) return 0;
|
||||
+ if (MOUNTMGR_CALL( get_volume_filesystem, ¶ms )) return 0;
|
||||
+
|
||||
+ if (!strcmp("apfs", fstypename) ||
|
||||
+ !strcmp("nfs", fstypename) ||
|
||||
+ !strcmp("cifs", fstypename) ||
|
||||
+ !strcmp("ncpfs", fstypename) ||
|
||||
+ !strcmp("tmpfs", fstypename) ||
|
||||
+ !strcmp("cramfs", fstypename) ||
|
||||
+ !strcmp("devfs", fstypename) ||
|
||||
+ !strcmp("procfs", fstypename) ||
|
||||
+ !strcmp("ext2", fstypename) ||
|
||||
+ !strcmp("ext3", fstypename) ||
|
||||
+ !strcmp("ext4", fstypename) ||
|
||||
+ !strcmp("hfs", fstypename) ||
|
||||
+ !strcmp("hpfs", fstypename) ||
|
||||
+ !strcmp("ntfs", fstypename))
|
||||
+ {
|
||||
+ return FILE_SUPPORTS_REPARSE_POINTS;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
|
||||
/******************************************************************
|
||||
* VOLUME_FindCdRomDataBestVoldesc
|
||||
@@ -1695,7 +1725,8 @@ static NTSTATUS WINAPI harddisk_query_volume( DEVICE_OBJECT *device, IRP *irp )
|
||||
break;
|
||||
default:
|
||||
fsname = L"NTFS";
|
||||
- info->FileSystemAttributes = FILE_CASE_PRESERVED_NAMES | FILE_PERSISTENT_ACLS;
|
||||
+ info->FileSystemAttributes = FILE_CASE_PRESERVED_NAMES | FILE_PERSISTENT_ACLS
|
||||
+ | get_filesystem_flags( volume );
|
||||
info->MaximumComponentNameLength = 255;
|
||||
break;
|
||||
}
|
||||
diff --git a/dlls/mountmgr.sys/unixlib.c b/dlls/mountmgr.sys/unixlib.c
|
||||
index 52a3fce66d6..73735c22d13 100644
|
||||
--- a/dlls/mountmgr.sys/unixlib.c
|
||||
+++ b/dlls/mountmgr.sys/unixlib.c
|
||||
@@ -31,6 +31,21 @@
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
+#ifdef HAVE_SYS_STATFS_H
|
||||
+# include <sys/statfs.h>
|
||||
+#endif
|
||||
+#ifdef HAVE_SYS_SYSCALL_H
|
||||
+# include <sys/syscall.h>
|
||||
+#endif
|
||||
+#ifdef HAVE_SYS_VFS_H
|
||||
+# include <sys/vfs.h>
|
||||
+#endif
|
||||
+#ifdef HAVE_SYS_PARAM_H
|
||||
+#include <sys/param.h>
|
||||
+#endif
|
||||
+#ifdef HAVE_SYS_MOUNT_H
|
||||
+#include <sys/mount.h>
|
||||
+#endif
|
||||
|
||||
#include "unixlib.h"
|
||||
|
||||
@@ -311,6 +326,87 @@ static NTSTATUS read_volume_file( void *args )
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
+static NTSTATUS get_volume_filesystem( void *args )
|
||||
+{
|
||||
+#if defined(__NR_renameat2) || defined(RENAME_SWAP)
|
||||
+ const struct get_volume_filesystem_params *params = args;
|
||||
+#if defined(HAVE_FSTATFS)
|
||||
+ struct statfs stfs;
|
||||
+#elif defined(HAVE_FSTATVFS)
|
||||
+ struct statvfs stfs;
|
||||
+#endif
|
||||
+ int fd;
|
||||
+ const char *fstypename = "unknown";
|
||||
+ int fd = -1;
|
||||
+
|
||||
+ if (params->volume[0] != '/')
|
||||
+ {
|
||||
+ char *path = get_dosdevices_path( params->volume );
|
||||
+ if (path) fd = open( path, O_RDONLY );
|
||||
+ free( path );
|
||||
+ }
|
||||
+ else fd = open( params->volume, O_RDONLY );
|
||||
+ if (fd == -1) return STATUS_NO_SUCH_FILE;
|
||||
+
|
||||
+ if ((fd = open_volume_file( volume, "" )) == -1)
|
||||
+ return 0;
|
||||
+#if defined(HAVE_FSTATFS)
|
||||
+ if (fstatfs(fd, &stfs))
|
||||
+ return 0;
|
||||
+ return STATUS_NO_SUCH_FILE;
|
||||
+#elif defined(HAVE_FSTATVFS)
|
||||
+ if (fstatvfs(fd, &stfs))
|
||||
+ return 0;
|
||||
+ return STATUS_NO_SUCH_FILE;
|
||||
+#endif
|
||||
+ close( fd );
|
||||
+#if defined(HAVE_FSTATFS) && defined(linux)
|
||||
+ switch (stfs.f_type)
|
||||
+ {
|
||||
+ case 0x6969: /* nfs */
|
||||
+ fstypename = "nfs";
|
||||
+ break;
|
||||
+ case 0xff534d42: /* cifs */
|
||||
+ fstypename = "cifs";
|
||||
+ break;
|
||||
+ case 0x564c: /* ncpfs */
|
||||
+ fstypename = "ncpfs";
|
||||
+ break;
|
||||
+ case 0x01021994: /* tmpfs */
|
||||
+ fstypename = "tmpfs";
|
||||
+ break;
|
||||
+ case 0x28cd3d45: /* cramfs */
|
||||
+ fstypename = "cramfs";
|
||||
+ break;
|
||||
+ case 0x1373: /* devfs */
|
||||
+ fstypename = "devfs";
|
||||
+ break;
|
||||
+ case 0x9fa0: /* procfs */
|
||||
+ fstypename = "procfs";
|
||||
+ break;
|
||||
+ case 0xef51: /* old ext2 */
|
||||
+ fstypename = "ext2";
|
||||
+ break;
|
||||
+ case 0xef53: /* ext2/3/4 */
|
||||
+ fstypename = "ext2";
|
||||
+ break;
|
||||
+ case 0x4244: /* hfs */
|
||||
+ fstypename = "hfs";
|
||||
+ break;
|
||||
+ case 0xf995e849: /* hpfs */
|
||||
+ fstypename = "hpfs";
|
||||
+ break;
|
||||
+ case 0x5346544e: /* ntfs */
|
||||
+ return FILE_SUPPORTS_REPARSE_POINTS;
|
||||
+ fstypename = "ntfs";
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__) || defined(__NetBSD__)
|
||||
+ if (!strcmp("apfs", stfs.f_fstypename) ||
|
||||
+ !strcmp("nfs", stfs.f_fstypename) ||
|
||||
+ !strcmp("cifs", stfs.f_fstypename) ||
|
||||
+ !strcmp("ncpfs", stfs.f_fstypename) ||
|
||||
+ !strcmp("tmpfs", stfs.f_fstypename) ||
|
||||
+ !strcmp("cramfs", stfs.f_fstypename) ||
|
||||
+ !strcmp("devfs", stfs.f_fstypename) ||
|
||||
+ !strcmp("procfs", stfs.f_fstypename) ||
|
||||
+ !strcmp("ext2", stfs.f_fstypename) ||
|
||||
+ !strcmp("ext3", stfs.f_fstypename) ||
|
||||
+ !strcmp("ext4", stfs.f_fstypename) ||
|
||||
+ !strcmp("hfs", stfs.f_fstypename) ||
|
||||
+ !strcmp("hpfs", stfs.f_fstypename) ||
|
||||
+ !strcmp("ntfs", stfs.f_fstypename))
|
||||
+ {
|
||||
+ return FILE_SUPPORTS_REPARSE_POINTS;
|
||||
+ }
|
||||
+ fstypename = stfs.f_fstypename;
|
||||
+#endif
|
||||
+ lstrcpynA( params->fstypename, fstypename, *params->size );
|
||||
+ return STATUS_SUCCESS;
|
||||
+#else
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+#endif
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static NTSTATUS WINAPI harddisk_query_volume( DEVICE_OBJECT *device, IRP *irp )
|
||||
static NTSTATUS match_unixdev( void *args )
|
||||
{
|
||||
IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp );
|
||||
@@ -1695,7 +1758,8 @@ static NTSTATUS WINAPI harddisk_query_volume( DEVICE_OBJECT *device, IRP *irp )
|
||||
break;
|
||||
default:
|
||||
fsname = L"NTFS";
|
||||
- info->FileSystemAttributes = FILE_CASE_PRESERVED_NAMES | FILE_PERSISTENT_ACLS;
|
||||
+ info->FileSystemAttributes = FILE_CASE_PRESERVED_NAMES | FILE_PERSISTENT_ACLS
|
||||
+ | get_fs_flags( volume );
|
||||
info->MaximumComponentNameLength = 255;
|
||||
break;
|
||||
}
|
||||
const struct match_unixdev_params *params = args;
|
||||
@@ -454,4 +550,5 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
|
||||
write_credential,
|
||||
delete_credential,
|
||||
enumerate_credentials,
|
||||
+ get_volume_filesystem,
|
||||
};
|
||||
diff --git a/dlls/mountmgr.sys/unixlib.h b/dlls/mountmgr.sys/unixlib.h
|
||||
index e7846a764da..188cf93b091 100644
|
||||
--- a/dlls/mountmgr.sys/unixlib.h
|
||||
+++ b/dlls/mountmgr.sys/unixlib.h
|
||||
@@ -91,6 +91,13 @@ struct read_volume_file_params
|
||||
ULONG *size;
|
||||
};
|
||||
|
||||
+struct get_volume_filesystem_params
|
||||
+{
|
||||
+ const char *volume;
|
||||
+ void *fstypename;
|
||||
+ ULONG *size;
|
||||
+};
|
||||
+
|
||||
struct match_unixdev_params
|
||||
{
|
||||
const char *device;
|
||||
@@ -156,6 +163,7 @@ enum mountmgr_funcs
|
||||
unix_write_credential,
|
||||
unix_delete_credential,
|
||||
unix_enumerate_credentials,
|
||||
+ unix_get_volume_filesystem,
|
||||
};
|
||||
|
||||
extern unixlib_handle_t mountmgr_handle;
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index c5b3b83802e..084398ba83d 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
@ -121,5 +237,5 @@ index c5b3b83802e..084398ba83d 100644
|
||||
{
|
||||
skip("File system does not support reparse points.\n");
|
||||
--
|
||||
2.33.0
|
||||
2.17.1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 4f24462df45c573934d5507fd5ec0a3cbe8c7bdd Mon Sep 17 00:00:00 2001
|
||||
From 0d11bb3b7baf33f2b86f6e62e7a062bd22699895 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.
|
||||
Subject: ntdll: Add support for absolute symlink creation.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@ -193,10 +193,10 @@ index 084398ba83d..81cc2ab5dab 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index c6cdf54a061..d9e0388af2d 100644
|
||||
index 79cf0f2dbca..4605d82ec81 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -5981,18 +5981,35 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer,
|
||||
@@ -5971,18 +5971,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 c6cdf54a061..d9e0388af2d 100644
|
||||
if ((status = server_get_unix_fd( handle, FILE_SPECIAL_ACCESS, &dest_fd, &needs_close, NULL, NULL )))
|
||||
return status;
|
||||
|
||||
@@ -6027,6 +6044,20 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6017,6 +6034,20 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
strcat( magic_dest, "." );
|
||||
strcat( magic_dest, "/" );
|
||||
}
|
||||
@ -256,7 +256,7 @@ index c6cdf54a061..d9e0388af2d 100644
|
||||
strcat( magic_dest, unix_dest );
|
||||
|
||||
/* Produce the link in a temporary location in the same folder */
|
||||
@@ -6391,17 +6422,7 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
@@ -6385,17 +6416,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;
|
||||
@ -309,5 +309,5 @@ index 4539b89d583..ab3273d3f81 100644
|
||||
typedef struct _REPARSE_GUID_DATA_BUFFER {
|
||||
DWORD ReparseTag;
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From febfe0aa6ee03bdcd4be96998f623648fe30e4e2 Mon Sep 17 00:00:00 2001
|
||||
From 71060418f320eb0c78073b1b035bc9d905b778c6 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.
|
||||
Subject: ntdll: Add support for reading absolute symlinks.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@ -47,10 +47,10 @@ index 81cc2ab5dab..bf9d9677412 100644
|
||||
/* Cleanup */
|
||||
pRtlFreeUnicodeString(&nameW);
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index d9e0388af2d..24871ee8a32 100644
|
||||
index 4605d82ec81..00e92e83887 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -6130,6 +6130,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6121,6 +6121,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG *si
|
||||
int unix_dest_len;
|
||||
DWORD max_length;
|
||||
NTSTATUS status;
|
||||
@ -58,7 +58,7 @@ index d9e0388af2d..24871ee8a32 100644
|
||||
WCHAR *nt_dest;
|
||||
ssize_t ret;
|
||||
char *p;
|
||||
@@ -6173,6 +6174,17 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6164,6 +6165,17 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG *si
|
||||
}
|
||||
buffer->ReparseTag |= (val << i);
|
||||
}
|
||||
@ -76,7 +76,7 @@ index d9e0388af2d..24871ee8a32 100644
|
||||
unix_dest_len -= (p - unix_dest);
|
||||
memmove(unix_dest, p, unix_dest_len);
|
||||
unix_dest[unix_dest_len] = 0;
|
||||
@@ -6210,6 +6222,20 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6201,6 +6213,20 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG *si
|
||||
path_len += (nt_dest_len - prefix_len*sizeof(WCHAR)) + sizeof(WCHAR);
|
||||
total_len = FIELD_OFFSET(typeof(*buffer), MountPointReparseBuffer.PathBuffer[path_len/sizeof(WCHAR)]);
|
||||
break;
|
||||
@ -98,5 +98,5 @@ index d9e0388af2d..24871ee8a32 100644
|
||||
/* unrecognized (regular) files should probably be treated as symlinks */
|
||||
WARN("unrecognized symbolic link\n");
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 68b56e8cfc85063df0c7bf93bf32002d4a264858 Mon Sep 17 00:00:00 2001
|
||||
From 5a87d55e7613e67c854f62f66b9cc5221bfb993d 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.
|
||||
Subject: ntdll: Add support for deleting symlinks.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@ -37,10 +37,10 @@ index bf9d9677412..3a6396e5afc 100644
|
||||
|
||||
cleanup:
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 24871ee8a32..2ff931aa57c 100644
|
||||
index 00e92e83887..5ed116d94d9 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -6430,6 +6430,7 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
@@ -6422,6 +6422,7 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
switch(buffer->ReparseTag)
|
||||
{
|
||||
case IO_REPARSE_TAG_MOUNT_POINT:
|
||||
@ -49,5 +49,5 @@ index 24871ee8a32..2ff931aa57c 100644
|
||||
break;
|
||||
default:
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 61a601cef64c692cd846b01478a3462c382afa04 Mon Sep 17 00:00:00 2001
|
||||
From bb6e330f99c2ca104f312cb790ff15eb4af79f41 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.
|
||||
Subject: ntdll: Add support for relative symlink creation.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@ -102,10 +102,10 @@ index 3a6396e5afc..1ace7f76c1f 100644
|
||||
/* Cleanup */
|
||||
pRtlFreeUnicodeString(&nameW);
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 2ff931aa57c..2f2658ffb3e 100644
|
||||
index 5ed116d94d9..35ae5ab854a 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -3342,7 +3342,7 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer
|
||||
@@ -3335,7 +3335,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 */
|
||||
@ -114,7 +114,7 @@ index 2ff931aa57c..2f2658ffb3e 100644
|
||||
{
|
||||
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,
|
||||
@@ -5970,17 +5970,20 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer,
|
||||
*/
|
||||
NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
{
|
||||
@ -137,7 +137,7 @@ index 2ff931aa57c..2f2658ffb3e 100644
|
||||
int i;
|
||||
|
||||
switch(buffer->ReparseTag)
|
||||
@@ -5999,11 +6002,13 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -5989,11 +5992,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];
|
||||
@ -151,7 +151,7 @@ index 2ff931aa57c..2f2658ffb3e 100644
|
||||
break;
|
||||
default:
|
||||
FIXME("stub: FSCTL_SET_REPARSE_POINT(%x)\n", buffer->ReparseTag);
|
||||
@@ -6016,8 +6021,66 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6006,8 +6011,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;
|
||||
@ -220,7 +220,7 @@ index 2ff931aa57c..2f2658ffb3e 100644
|
||||
for (;;)
|
||||
{
|
||||
unix_dest = malloc( unix_dest_len );
|
||||
@@ -6033,11 +6096,24 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6023,11 +6086,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;
|
||||
@ -247,7 +247,7 @@ index 2ff931aa57c..2f2658ffb3e 100644
|
||||
for (i = 0; i < sizeof(ULONG)*8; i++)
|
||||
{
|
||||
if ((buffer->ReparseTag >> i) & 1)
|
||||
@@ -6058,7 +6134,7 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6048,7 +6124,7 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
strcat( magic_dest, "." );
|
||||
strcat( magic_dest, "/" );
|
||||
}
|
||||
@ -256,7 +256,7 @@ index 2ff931aa57c..2f2658ffb3e 100644
|
||||
|
||||
/* Produce the link in a temporary location in the same folder */
|
||||
strcpy( tmpdir, unix_src );
|
||||
@@ -6108,7 +6184,9 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6098,7 +6174,9 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
|
||||
cleanup:
|
||||
if (tempdir_created) rmdir( tmpdir );
|
||||
@ -278,10 +278,10 @@ index ab3273d3f81..0d02225bc4f 100644
|
||||
+
|
||||
#endif /* __WINE_NTIFS_H */
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index 68aa4afc176..9e39f2aa5b8 100644
|
||||
index 24609e136bf..d7017f98db0 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -2798,6 +2798,7 @@ typedef struct _RTL_ATOM_TABLE
|
||||
@@ -2842,6 +2842,7 @@ typedef struct _RTL_ATOM_TABLE
|
||||
#define FILE_OVERWRITE 4
|
||||
#define FILE_OVERWRITE_IF 5
|
||||
#define FILE_MAXIMUM_DISPOSITION 5
|
||||
@ -290,5 +290,5 @@ index 68aa4afc176..9e39f2aa5b8 100644
|
||||
/* Characteristics of a File System */
|
||||
#define FILE_REMOVABLE_MEDIA 0x00000001
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 9e13af5faec34f398440f88d357c16a01687c6ac Mon Sep 17 00:00:00 2001
|
||||
From 7c1e6d56e5faa72f8adff738fc2f2e774ee1b754 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.
|
||||
Subject: ntdll: Add support for reading relative symlinks.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@ -38,10 +38,10 @@ index 1ace7f76c1f..2f0903fe7f1 100644
|
||||
/* Cleanup */
|
||||
pRtlFreeUnicodeString(&nameW);
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 2f2658ffb3e..dd5924731ad 100644
|
||||
index 35ae5ab854a..bf63985f777 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -6230,6 +6230,11 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6221,6 +6221,11 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG *si
|
||||
|
||||
/* Decode the reparse tag from the symlink */
|
||||
p = unix_dest;
|
||||
@ -53,7 +53,7 @@ index 2f2658ffb3e..dd5924731ad 100644
|
||||
if (*p++ != '/')
|
||||
{
|
||||
status = STATUS_NOT_IMPLEMENTED;
|
||||
@@ -6267,24 +6272,47 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6258,24 +6263,47 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG *si
|
||||
memmove(unix_dest, p, unix_dest_len);
|
||||
unix_dest[unix_dest_len] = 0;
|
||||
|
||||
@ -107,5 +107,5 @@ index 2f2658ffb3e..dd5924731ad 100644
|
||||
{
|
||||
case IO_REPARSE_TAG_MOUNT_POINT:
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 305cf8b8d52fee284d4b34160bdacd0aef8ddbb0 Mon Sep 17 00:00:00 2001
|
||||
From 5947b38607a0235f1f52cda37760325254a586bb 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.
|
||||
Subject: ntdll: Add support for file symlinks.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@ -50,10 +50,10 @@ index 2f0903fe7f1..dd1fe247288 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 dd5924731ad..3e4341df363 100644
|
||||
index bf63985f777..e082ff5d322 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -5990,6 +5990,7 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -5980,6 +5980,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 dd5924731ad..3e4341df363 100644
|
||||
NTSTATUS status;
|
||||
struct stat st;
|
||||
WCHAR *dest;
|
||||
@@ -6123,7 +6124,6 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6113,7 +6114,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 dd5924731ad..3e4341df363 100644
|
||||
if (fstat( dest_fd, &st ) == -1)
|
||||
{
|
||||
status = errno_to_status( errno );
|
||||
@@ -6157,8 +6157,11 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6147,8 +6147,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 dd5924731ad..3e4341df363 100644
|
||||
}
|
||||
else if (errno == ENOSYS)
|
||||
{
|
||||
@@ -6375,6 +6378,7 @@ NTSTATUS remove_reparse_point(HANDLE handle, REPARSE_GUID_DATA_BUFFER *buffer)
|
||||
@@ -6367,6 +6370,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 dd5924731ad..3e4341df363 100644
|
||||
NTSTATUS status;
|
||||
char *unix_name;
|
||||
struct stat st;
|
||||
@@ -6387,12 +6391,13 @@ NTSTATUS remove_reparse_point(HANDLE handle, REPARSE_GUID_DATA_BUFFER *buffer)
|
||||
@@ -6379,12 +6383,13 @@ NTSTATUS remove_reparse_point(HANDLE handle, REPARSE_GUID_DATA_BUFFER *buffer)
|
||||
|
||||
TRACE( "Deleting symlink %s\n", unix_name );
|
||||
|
||||
@ -106,7 +106,7 @@ index dd5924731ad..3e4341df363 100644
|
||||
strcpy( tmpdir, unix_name );
|
||||
d = dirname( tmpdir);
|
||||
if (d != tmpdir) strcpy( tmpdir, d );
|
||||
@@ -6405,11 +6410,21 @@ NTSTATUS remove_reparse_point(HANDLE handle, REPARSE_GUID_DATA_BUFFER *buffer)
|
||||
@@ -6397,11 +6402,21 @@ NTSTATUS remove_reparse_point(HANDLE handle, REPARSE_GUID_DATA_BUFFER *buffer)
|
||||
tempdir_created = TRUE;
|
||||
strcpy( tmpfile, tmpdir );
|
||||
strcat( tmpfile, "/tmpfile" );
|
||||
@ -130,5 +130,5 @@ index dd5924731ad..3e4341df363 100644
|
||||
lchown( tmpfile, st.st_uid, st.st_gid );
|
||||
/* Atomically move the directory into position */
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
From f3adc1cfdff14e1baca4e8e0f42774435f85c110 Mon Sep 17 00:00:00 2001
|
||||
From 35bc7e69e9100202e0f0d91ee66449a13ef4d075 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
|
||||
non-existent paths.
|
||||
Subject: ntdll: Allow creation of dangling reparse points to non-existent
|
||||
paths.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@ -10,10 +10,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
1 file changed, 17 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 3e4341df363..d654f82e8d7 100644
|
||||
index e082ff5d322..e749e192f6f 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -3409,7 +3409,8 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer
|
||||
@@ -3402,7 +3402,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)
|
||||
{
|
||||
@ -23,7 +23,7 @@ index 3e4341df363..d654f82e8d7 100644
|
||||
{
|
||||
status = STATUS_OBJECT_NAME_NOT_FOUND;
|
||||
if (disposition != FILE_OPEN && disposition != FILE_OVERWRITE)
|
||||
@@ -3429,6 +3430,20 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer
|
||||
@@ -3422,6 +3423,20 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer
|
||||
status = STATUS_OBJECT_NAME_COLLISION;
|
||||
}
|
||||
}
|
||||
@ -44,7 +44,7 @@ index 3e4341df363..d654f82e8d7 100644
|
||||
|
||||
if (status != STATUS_SUCCESS) break;
|
||||
|
||||
@@ -6090,7 +6105,7 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
@@ -6080,7 +6095,7 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
status = STATUS_NO_MEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
@ -54,5 +54,5 @@ index 3e4341df363..d654f82e8d7 100644
|
||||
free( unix_dest );
|
||||
}
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
From ae2de3a0dd9c403317e6e681bb32d13907e2f61a Mon Sep 17 00:00:00 2001
|
||||
From e8f479e5fe6157f37a12af40ac4e336b93f8c04a 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.
|
||||
Subject: ntdll: Correctly report file symbolic links as files.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
dlls/ntdll/unix/file.c | 116 +++++++++++++++++++++++++++--------------
|
||||
1 file changed, 78 insertions(+), 38 deletions(-)
|
||||
dlls/ntdll/unix/file.c | 118 +++++++++++++++++++++++++++--------------
|
||||
1 file changed, 79 insertions(+), 39 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index d654f82e8d7..a84062df272 100644
|
||||
index e749e192f6f..461ad89938f 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 )
|
||||
@@ -1599,6 +1599,9 @@ static inline int get_file_xattr( char *hexattr, int attrlen )
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ index d654f82e8d7..a84062df272 100644
|
||||
/* fetch the attributes of a file */
|
||||
static inline ULONG get_file_attributes( const struct stat *st )
|
||||
{
|
||||
@@ -1690,10 +1693,15 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
@@ -1683,10 +1686,15 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
if (ret == -1) return ret;
|
||||
if (S_ISLNK( st->st_mode ))
|
||||
{
|
||||
@ -42,7 +42,7 @@ index d654f82e8d7..a84062df272 100644
|
||||
}
|
||||
else if (S_ISDIR( st->st_mode ) && (parent_path = malloc( strlen(path) + 4 )))
|
||||
{
|
||||
@@ -6211,46 +6219,35 @@ cleanup:
|
||||
@@ -6201,47 +6209,35 @@ cleanup:
|
||||
}
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ index d654f82e8d7..a84062df272 100644
|
||||
- * Retrieve the unix name corresponding to a file handle and use that to find the destination of the
|
||||
- * symlink corresponding to that file handle.
|
||||
- */
|
||||
-NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out_size)
|
||||
-NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG *size)
|
||||
+NTSTATUS get_symlink_properties(const char *unix_src, char *unix_dest, int *unix_dest_len,
|
||||
+ DWORD *tag, ULONG *flags, BOOL *is_dir)
|
||||
{
|
||||
@ -60,6 +60,7 @@ index d654f82e8d7..a84062df272 100644
|
||||
- SIZE_T nt_dest_len = PATH_MAX;
|
||||
- BOOL dest_allocated = FALSE;
|
||||
- int dest_fd, needs_close;
|
||||
- ULONG out_size = *size;
|
||||
- int unix_dest_len;
|
||||
- DWORD max_length;
|
||||
+ int len = MAX_PATH;
|
||||
@ -105,7 +106,7 @@ index d654f82e8d7..a84062df272 100644
|
||||
p++;
|
||||
}
|
||||
if (*p++ != '/')
|
||||
@@ -6258,7 +6255,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6249,7 +6245,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG *si
|
||||
status = STATUS_NOT_IMPLEMENTED;
|
||||
goto cleanup;
|
||||
}
|
||||
@ -114,7 +115,7 @@ index d654f82e8d7..a84062df272 100644
|
||||
for (i = 0; i < sizeof(ULONG)*8; i++)
|
||||
{
|
||||
char c = *p++;
|
||||
@@ -6273,22 +6270,65 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out
|
||||
@@ -6264,22 +6260,66 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG *si
|
||||
status = STATUS_NOT_IMPLEMENTED;
|
||||
goto cleanup;
|
||||
}
|
||||
@ -160,7 +161,7 @@ index d654f82e8d7..a84062df272 100644
|
||||
+ * Retrieve the unix name corresponding to a file handle and use that to find the destination of the
|
||||
+ * symlink corresponding to that file handle.
|
||||
+ */
|
||||
+NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out_size)
|
||||
+NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG *size)
|
||||
+{
|
||||
+ INT prefix_len, path_len, total_len;
|
||||
+ char *unix_src, unix_dest[PATH_MAX];
|
||||
@ -169,6 +170,7 @@ index d654f82e8d7..a84062df272 100644
|
||||
+ int unix_dest_len = PATH_MAX;
|
||||
+ BOOL dest_allocated = FALSE;
|
||||
+ int dest_fd, needs_close;
|
||||
+ ULONG out_size = *size;
|
||||
+ DWORD max_length;
|
||||
+ NTSTATUS status;
|
||||
+ ULONG flags = 0;
|
||||
@ -187,5 +189,5 @@ index d654f82e8d7..a84062df272 100644
|
||||
/* convert the relative path into an absolute path */
|
||||
if (flags == SYMLINK_FLAG_RELATIVE)
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
@ -1,15 +1,16 @@
|
||||
From 38208bd58f6c39d87fec031bd9cc996d60416614 Mon Sep 17 00:00:00 2001
|
||||
From 08e37ba50a5dc930c0d46199836d72100008ee31 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
|
||||
to ntdll.
|
||||
Subject: kernelbase: Convert FILE_FLAG_OPEN_REPARSE_POINT for passing to
|
||||
ntdll.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
dlls/kernelbase/file.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
|
||||
index d21ad299d1f..eecc23f48fc 100644
|
||||
index 5c7b649d805..a9e05be62da 100644
|
||||
--- a/dlls/kernelbase/file.c
|
||||
+++ b/dlls/kernelbase/file.c
|
||||
@@ -727,6 +727,8 @@ static UINT get_nt_file_options( DWORD attributes )
|
||||
@ -22,5 +23,5 @@ index d21ad299d1f..eecc23f48fc 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
From 8bf803c2e96ff62b165551f2cd4dae1cc98ca7b3 Mon Sep 17 00:00:00 2001
|
||||
From f9a9c4ef4515184fde0478591bfc08d8de9c49c1 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.
|
||||
Subject: server: Implement FILE_OPEN_REPARSE_POINT option.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
dlls/ntdll/tests/file.c | 27 +++++++++++++++++++++++----
|
||||
server/fd.c | 39 ++++++++++++++++++++++++++++++++-------
|
||||
@ -82,10 +83,10 @@ index dd1fe247288..490d5160761 100644
|
||||
CloseHandle(handle);
|
||||
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index 2adadceae25..4f3197a470a 100644
|
||||
index ce1c47d58a9..4fe8be31ab3 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -107,6 +107,10 @@
|
||||
@@ -101,6 +101,10 @@
|
||||
#include "winioctl.h"
|
||||
#include "ddk/wdm.h"
|
||||
|
||||
@ -96,7 +97,7 @@ index 2adadceae25..4f3197a470a 100644
|
||||
#if defined(HAVE_SYS_EPOLL_H) && defined(HAVE_EPOLL_CREATE)
|
||||
# include <sys/epoll.h>
|
||||
# define USE_EPOLL
|
||||
@@ -1895,6 +1899,14 @@ void get_nt_name( struct fd *fd, struct unicode_str *name )
|
||||
@@ -1902,6 +1906,14 @@ void get_nt_name( struct fd *fd, struct unicode_str *name )
|
||||
name->len = fd->nt_namelen;
|
||||
}
|
||||
|
||||
@ -111,7 +112,7 @@ index 2adadceae25..4f3197a470a 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,
|
||||
@@ -1955,6 +1967,18 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -1962,6 +1974,18 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
}
|
||||
else rw_mode = O_RDONLY;
|
||||
|
||||
@ -130,7 +131,7 @@ index 2adadceae25..4f3197a470a 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 */
|
||||
@@ -1972,12 +1996,6 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -1979,12 +2003,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 +144,7 @@ index 2adadceae25..4f3197a470a 100644
|
||||
|
||||
closed_fd->unix_fd = fd->unix_fd;
|
||||
closed_fd->unlink = 0;
|
||||
@@ -2428,6 +2446,7 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
|
||||
@@ -2453,6 +2471,7 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
|
||||
|
||||
static int is_dir_empty( int fd )
|
||||
{
|
||||
@ -151,7 +152,7 @@ index 2adadceae25..4f3197a470a 100644
|
||||
DIR *dir;
|
||||
int empty;
|
||||
struct dirent *de;
|
||||
@@ -2435,8 +2454,13 @@ static int is_dir_empty( int fd )
|
||||
@@ -2460,8 +2479,13 @@ static int is_dir_empty( int fd )
|
||||
if ((fd = dup( fd )) == -1)
|
||||
return -1;
|
||||
|
||||
@ -166,7 +167,7 @@ index 2adadceae25..4f3197a470a 100644
|
||||
close( fd );
|
||||
return -1;
|
||||
}
|
||||
@@ -2448,6 +2472,7 @@ static int is_dir_empty( int fd )
|
||||
@@ -2473,6 +2497,7 @@ static int is_dir_empty( int fd )
|
||||
empty = 0;
|
||||
}
|
||||
closedir( dir );
|
||||
@ -175,5 +176,5 @@ index 2adadceae25..4f3197a470a 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
From c0f79c570c9b54d7ea42af6c9e8a2e25b83a6c01 Mon Sep 17 00:00:00 2001
|
||||
From ac5d188111d81beef35e3953ae4f2f0f1c6a1b6a 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
|
||||
points.
|
||||
Subject: ntdll: Allow set_file_times_precise to work on reparse points.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
configure.ac | 3 ++-
|
||||
dlls/ntdll/tests/file.c | 8 ++++----
|
||||
@ -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 2b68bdde1d2..bf9e8103606 100644
|
||||
index 9e113d939ec..7c2705b88b8 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2183,7 +2183,8 @@ AC_CHECK_FUNCS(\
|
||||
@@ -2034,7 +2034,8 @@ AC_CHECK_FUNCS(\
|
||||
sigprocmask \
|
||||
sysinfo \
|
||||
tcdrain \
|
||||
@ -65,10 +65,10 @@ index 490d5160761..2449ee54799 100644
|
||||
CloseHandle(handle);
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index efde4dd41f1..d60a3c44b00 100644
|
||||
index 461ad89938f..364bda14b4b 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -1728,6 +1728,14 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
@@ -1724,6 +1724,14 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
}
|
||||
|
||||
|
||||
@ -83,7 +83,7 @@ index efde4dd41f1..d60a3c44b00 100644
|
||||
#if defined(__ANDROID__) && !defined(HAVE_FUTIMENS)
|
||||
static int futimens( int fd, const struct timespec spec[2] )
|
||||
{
|
||||
@@ -1743,7 +1751,7 @@ static int futimens( int fd, const struct timespec spec[2] )
|
||||
@@ -1739,7 +1747,7 @@ static int futimens( int fd, const struct timespec spec[2] )
|
||||
static BOOL set_file_times_precise( int fd, const LARGE_INTEGER *mtime,
|
||||
const LARGE_INTEGER *atime, NTSTATUS *status )
|
||||
{
|
||||
@ -92,7 +92,7 @@ index efde4dd41f1..d60a3c44b00 100644
|
||||
struct timespec tv[2];
|
||||
|
||||
tv[0].tv_sec = tv[1].tv_sec = 0;
|
||||
@@ -1759,10 +1767,16 @@ static BOOL set_file_times_precise( int fd, const LARGE_INTEGER *mtime,
|
||||
@@ -1755,10 +1763,16 @@ static BOOL set_file_times_precise( int fd, const LARGE_INTEGER *mtime,
|
||||
tv[1].tv_nsec = (mtime->QuadPart % 10000000) * 100;
|
||||
}
|
||||
#ifdef __APPLE__
|
||||
@ -113,5 +113,5 @@ index efde4dd41f1..d60a3c44b00 100644
|
||||
#else
|
||||
return FALSE;
|
||||
--
|
||||
2.33.0
|
||||
2.17.1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 9b5273bca73d9bd0d86a30f4517c6d37297c8c12 Mon Sep 17 00:00:00 2001
|
||||
From 854ece04789b7243ebb440c8dfe0bc6bebbf71b2 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.
|
||||
Subject: server: Properly handle file symlink deletion.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@ -39,10 +39,10 @@ index 2449ee54799..9fe806ff3cc 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 4f3197a470a..fa5805ba840 100644
|
||||
index 4fe8be31ab3..c12677e7615 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -1907,6 +1907,55 @@ int check_symlink( char *name )
|
||||
@@ -1914,6 +1914,55 @@ int check_symlink( char *name )
|
||||
return S_ISLNK( st.st_mode );
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ index 4f3197a470a..fa5805ba840 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,
|
||||
@@ -2009,6 +2058,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -2016,6 +2065,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 4f3197a470a..fa5805ba840 100644
|
||||
|
||||
if (!inode)
|
||||
{
|
||||
@@ -2023,16 +2073,20 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -2030,16 +2080,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;
|
||||
|
||||
@ -130,5 +130,5 @@ index 4f3197a470a..fa5805ba840 100644
|
||||
set_error( STATUS_FILE_IS_A_DIRECTORY );
|
||||
goto error;
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
@ -1,17 +1,18 @@
|
||||
From ad32c366caa3737a2695c8d138972baafe5b152e Mon Sep 17 00:00:00 2001
|
||||
From 37ad149d47e7807e1a02d8b1e4e65ac51f84d8ae 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.
|
||||
Subject: server: Properly handle deleting dangling symlinks.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
server/fd.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index fa5805ba840..c8fa494caf9 100644
|
||||
index c12677e7615..b048568e85f 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -2026,6 +2026,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
|
||||
@@ -2033,6 +2033,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 +20,7 @@ index fa5805ba840..c8fa494caf9 100644
|
||||
}
|
||||
|
||||
if ((fd->unix_fd = open( name, rw_mode | (flags & ~O_TRUNC), *mode )) == -1)
|
||||
@@ -2565,7 +2566,7 @@ static void set_fd_disposition( struct fd *fd, int unlink )
|
||||
@@ -2590,7 +2591,7 @@ static void set_fd_disposition( struct fd *fd, int unlink )
|
||||
file_set_error();
|
||||
return;
|
||||
}
|
||||
@ -29,5 +30,5 @@ index fa5805ba840..c8fa494caf9 100644
|
||||
if (!(st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
|
||||
{
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
From 5449c86f52875d80d4ce0e8001b17dd47552e1a7 Mon Sep 17 00:00:00 2001
|
||||
From cba12ea98f0f7bf8fb133042f2d866c6d21c74af 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
|
||||
RemoveDirectory[A|W].
|
||||
Subject: kernelbase: Use FILE_OPEN_REPARSE_POINT in RemoveDirectory[A|W].
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
dlls/kernelbase/file.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
|
||||
index 7eabf5aa211..80497c1ac97 100644
|
||||
index a9e05be62da..904a4f0979f 100644
|
||||
--- a/dlls/kernelbase/file.c
|
||||
+++ b/dlls/kernelbase/file.c
|
||||
@@ -3484,7 +3484,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH RemoveDirectoryW( LPCWSTR path )
|
||||
@@ -3487,7 +3487,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH RemoveDirectoryW( LPCWSTR path )
|
||||
InitializeObjectAttributes( &attr, &nt_name, OBJ_CASE_INSENSITIVE, 0, NULL );
|
||||
status = NtOpenFile( &handle, DELETE | SYNCHRONIZE, &attr, &io,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
@ -22,5 +22,5 @@ index 7eabf5aa211..80497c1ac97 100644
|
||||
|
||||
if (!status)
|
||||
--
|
||||
2.30.2
|
||||
2.17.1
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user