diff --git a/patches/ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch b/patches/ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch index 3ac57188..dd962a65 100644 --- a/patches/ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch +++ b/patches/ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch @@ -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" 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 --- @@ -14,10 +14,10 @@ Signed-off-by: Erich E. Hoover 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 diff --git a/patches/ntdll-Junction_Points/0002-ntdll-Add-support-for-reading-junction-points.patch b/patches/ntdll-Junction_Points/0002-ntdll-Add-support-for-reading-junction-points.patch index 494d99c4..fee4d57a 100644 --- a/patches/ntdll-Junction_Points/0002-ntdll-Add-support-for-reading-junction-points.patch +++ b/patches/ntdll-Junction_Points/0002-ntdll-Add-support-for-reading-junction-points.patch @@ -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" 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 --- 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 diff --git a/patches/ntdll-Junction_Points/0003-ntdll-Add-support-for-deleting-junction-points.patch b/patches/ntdll-Junction_Points/0003-ntdll-Add-support-for-deleting-junction-points.patch index 452ee087..0369897d 100644 --- a/patches/ntdll-Junction_Points/0003-ntdll-Add-support-for-deleting-junction-points.patch +++ b/patches/ntdll-Junction_Points/0003-ntdll-Add-support-for-deleting-junction-points.patch @@ -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" 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 --- @@ -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 diff --git a/patches/ntdll-Junction_Points/0004-ntdll-Add-a-test-for-junction-point-advertisement.patch b/patches/ntdll-Junction_Points/0004-ntdll-Add-a-test-for-junction-point-advertisement.patch index 118d5ae6..7b49a9c4 100644 --- a/patches/ntdll-Junction_Points/0004-ntdll-Add-a-test-for-junction-point-advertisement.patch +++ b/patches/ntdll-Junction_Points/0004-ntdll-Add-a-test-for-junction-point-advertisement.patch @@ -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" 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 --- @@ -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 diff --git a/patches/ntdll-Junction_Points/0005-server-Add-support-for-deleting-junction-points-with.patch b/patches/ntdll-Junction_Points/0005-server-Add-support-for-deleting-junction-points-with.patch index b3791bb7..b1869314 100644 --- a/patches/ntdll-Junction_Points/0005-server-Add-support-for-deleting-junction-points-with.patch +++ b/patches/ntdll-Junction_Points/0005-server-Add-support-for-deleting-junction-points-with.patch @@ -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" 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 @@ -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 diff --git a/patches/ntdll-Junction_Points/0006-kernel32-Advertise-junction-point-support.patch b/patches/ntdll-Junction_Points/0006-kernel32-Advertise-junction-point-support.patch index 0a7e04cb..18fbb4ed 100644 --- a/patches/ntdll-Junction_Points/0006-kernel32-Advertise-junction-point-support.patch +++ b/patches/ntdll-Junction_Points/0006-kernel32-Advertise-junction-point-support.patch @@ -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" 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 --- - 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 + #include + #include ++#ifdef HAVE_SYS_STATFS_H ++# include ++#endif ++#ifdef HAVE_SYS_SYSCALL_H ++# include ++#endif ++#ifdef HAVE_SYS_VFS_H ++# include ++#endif ++#ifdef HAVE_SYS_PARAM_H ++#include ++#endif ++#ifdef HAVE_SYS_MOUNT_H ++#include ++#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 diff --git a/patches/ntdll-Junction_Points/0007-ntdll-Add-support-for-absolute-symlink-creation.patch b/patches/ntdll-Junction_Points/0007-ntdll-Add-support-for-absolute-symlink-creation.patch index a4632504..c82b5220 100644 --- a/patches/ntdll-Junction_Points/0007-ntdll-Add-support-for-absolute-symlink-creation.patch +++ b/patches/ntdll-Junction_Points/0007-ntdll-Add-support-for-absolute-symlink-creation.patch @@ -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" 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 --- @@ -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 diff --git a/patches/ntdll-Junction_Points/0008-ntdll-Add-support-for-reading-absolute-symlinks.patch b/patches/ntdll-Junction_Points/0008-ntdll-Add-support-for-reading-absolute-symlinks.patch index 902aff28..a66f5424 100644 --- a/patches/ntdll-Junction_Points/0008-ntdll-Add-support-for-reading-absolute-symlinks.patch +++ b/patches/ntdll-Junction_Points/0008-ntdll-Add-support-for-reading-absolute-symlinks.patch @@ -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" 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 --- @@ -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 diff --git a/patches/ntdll-Junction_Points/0009-ntdll-Add-support-for-deleting-symlinks.patch b/patches/ntdll-Junction_Points/0009-ntdll-Add-support-for-deleting-symlinks.patch index a47fba6a..a323f808 100644 --- a/patches/ntdll-Junction_Points/0009-ntdll-Add-support-for-deleting-symlinks.patch +++ b/patches/ntdll-Junction_Points/0009-ntdll-Add-support-for-deleting-symlinks.patch @@ -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" 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 --- @@ -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 diff --git a/patches/ntdll-Junction_Points/0010-ntdll-Add-support-for-relative-symlink-creation.patch b/patches/ntdll-Junction_Points/0010-ntdll-Add-support-for-relative-symlink-creation.patch index 88a8ce34..4cb1c3f9 100644 --- a/patches/ntdll-Junction_Points/0010-ntdll-Add-support-for-relative-symlink-creation.patch +++ b/patches/ntdll-Junction_Points/0010-ntdll-Add-support-for-relative-symlink-creation.patch @@ -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" 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 --- @@ -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 diff --git a/patches/ntdll-Junction_Points/0011-ntdll-Add-support-for-reading-relative-symlinks.patch b/patches/ntdll-Junction_Points/0011-ntdll-Add-support-for-reading-relative-symlinks.patch index 8740d796..bcec9ab3 100644 --- a/patches/ntdll-Junction_Points/0011-ntdll-Add-support-for-reading-relative-symlinks.patch +++ b/patches/ntdll-Junction_Points/0011-ntdll-Add-support-for-reading-relative-symlinks.patch @@ -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" 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 --- @@ -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 diff --git a/patches/ntdll-Junction_Points/0012-ntdll-Add-support-for-file-symlinks.patch b/patches/ntdll-Junction_Points/0012-ntdll-Add-support-for-file-symlinks.patch index cfc2a8b7..1493d3a4 100644 --- a/patches/ntdll-Junction_Points/0012-ntdll-Add-support-for-file-symlinks.patch +++ b/patches/ntdll-Junction_Points/0012-ntdll-Add-support-for-file-symlinks.patch @@ -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" 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 --- @@ -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 diff --git a/patches/ntdll-Junction_Points/0013-ntdll-Allow-creation-of-dangling-reparse-points-to-n.patch b/patches/ntdll-Junction_Points/0013-ntdll-Allow-creation-of-dangling-reparse-points-to-n.patch index f8dcd5d6..540b776b 100644 --- a/patches/ntdll-Junction_Points/0013-ntdll-Allow-creation-of-dangling-reparse-points-to-n.patch +++ b/patches/ntdll-Junction_Points/0013-ntdll-Allow-creation-of-dangling-reparse-points-to-n.patch @@ -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" 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 --- @@ -10,10 +10,10 @@ Signed-off-by: Erich E. Hoover 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 diff --git a/patches/ntdll-Junction_Points/0014-ntdll-Correctly-report-file-symbolic-links-as-files.patch b/patches/ntdll-Junction_Points/0014-ntdll-Correctly-report-file-symbolic-links-as-files.patch index af76d7e8..b76b75cb 100644 --- a/patches/ntdll-Junction_Points/0014-ntdll-Correctly-report-file-symbolic-links-as-files.patch +++ b/patches/ntdll-Junction_Points/0014-ntdll-Correctly-report-file-symbolic-links-as-files.patch @@ -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" 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 --- - 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 diff --git a/patches/ntdll-Junction_Points/0015-kernelbase-Convert-FILE_FLAG_OPEN_REPARSE_POINT-for-.patch b/patches/ntdll-Junction_Points/0015-kernelbase-Convert-FILE_FLAG_OPEN_REPARSE_POINT-for-.patch index 69f1a000..2040211f 100644 --- a/patches/ntdll-Junction_Points/0015-kernelbase-Convert-FILE_FLAG_OPEN_REPARSE_POINT-for-.patch +++ b/patches/ntdll-Junction_Points/0015-kernelbase-Convert-FILE_FLAG_OPEN_REPARSE_POINT-for-.patch @@ -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" 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 --- 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 diff --git a/patches/ntdll-Junction_Points/0016-server-Implement-FILE_OPEN_REPARSE_POINT-option.patch b/patches/ntdll-Junction_Points/0016-server-Implement-FILE_OPEN_REPARSE_POINT-option.patch index 87a46e82..bd5e00cb 100644 --- a/patches/ntdll-Junction_Points/0016-server-Implement-FILE_OPEN_REPARSE_POINT-option.patch +++ b/patches/ntdll-Junction_Points/0016-server-Implement-FILE_OPEN_REPARSE_POINT-option.patch @@ -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" 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 --- 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 # 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 diff --git a/patches/ntdll-Junction_Points/0017-ntdll-Allow-set_file_times_precise-to-work-on-repars.patch b/patches/ntdll-Junction_Points/0017-ntdll-Allow-set_file_times_precise-to-work-on-repars.patch index 275a19b1..b008fb31 100644 --- a/patches/ntdll-Junction_Points/0017-ntdll-Allow-set_file_times_precise-to-work-on-repars.patch +++ b/patches/ntdll-Junction_Points/0017-ntdll-Allow-set_file_times_precise-to-work-on-repars.patch @@ -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" 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 --- 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 diff --git a/patches/ntdll-Junction_Points/0018-server-Properly-handle-file-symlink-deletion.patch b/patches/ntdll-Junction_Points/0018-server-Properly-handle-file-symlink-deletion.patch index 891a4995..fcce0885 100644 --- a/patches/ntdll-Junction_Points/0018-server-Properly-handle-file-symlink-deletion.patch +++ b/patches/ntdll-Junction_Points/0018-server-Properly-handle-file-symlink-deletion.patch @@ -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" 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 --- @@ -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 diff --git a/patches/ntdll-Junction_Points/0019-server-Properly-handle-deleting-dangling-symlinks.patch b/patches/ntdll-Junction_Points/0019-server-Properly-handle-deleting-dangling-symlinks.patch index 47281cbe..e98744e1 100644 --- a/patches/ntdll-Junction_Points/0019-server-Properly-handle-deleting-dangling-symlinks.patch +++ b/patches/ntdll-Junction_Points/0019-server-Properly-handle-deleting-dangling-symlinks.patch @@ -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" 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 --- 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 diff --git a/patches/ntdll-Junction_Points/0020-kernelbase-Use-FILE_OPEN_REPARSE_POINT-in-RemoveDire.patch b/patches/ntdll-Junction_Points/0020-kernelbase-Use-FILE_OPEN_REPARSE_POINT-in-RemoveDire.patch index 2aa4e826..787ef253 100644 --- a/patches/ntdll-Junction_Points/0020-kernelbase-Use-FILE_OPEN_REPARSE_POINT-in-RemoveDire.patch +++ b/patches/ntdll-Junction_Points/0020-kernelbase-Use-FILE_OPEN_REPARSE_POINT-in-RemoveDire.patch @@ -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" 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 --- 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 diff --git a/patches/ntdll-Junction_Points/0021-ntdll-Always-report-symbolic-links-as-containing-zer.patch b/patches/ntdll-Junction_Points/0021-ntdll-Always-report-symbolic-links-as-containing-zer.patch index 8c6c0432..ca411b0a 100644 --- a/patches/ntdll-Junction_Points/0021-ntdll-Always-report-symbolic-links-as-containing-zer.patch +++ b/patches/ntdll-Junction_Points/0021-ntdll-Always-report-symbolic-links-as-containing-zer.patch @@ -1,7 +1,7 @@ -From 5f568c0ffd0eb113d86ddd0fd24aa70ae9b9aae5 Mon Sep 17 00:00:00 2001 +From 397ab90ccdf2d0fb0492955d2544fde31f2b7204 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 1 May 2019 12:06:20 -0600 -Subject: [PATCH] ntdll: Always report symbolic links as containing zero bytes. +Subject: ntdll: Always report symbolic links as containing zero bytes. Signed-off-by: Erich E. Hoover --- @@ -94,10 +94,10 @@ index 9fe806ff3cc..ebed2600920 100644 /* Create the directory symlink */ HeapFree(GetProcessHeap(), 0, buffer); diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index 185f7e3bbeb..fcdc596ff74 100644 +index 364bda14b4b..42ae14851fa 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 ) +@@ -1690,6 +1690,8 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr ) /* return information about the destination (unless this is a dangling symlink) */ stat( path, st ); @@ -107,5 +107,5 @@ index 185f7e3bbeb..fcdc596ff74 100644 *attr |= FILE_ATTRIBUTE_REPARSE_POINT; /* whether a reparse point is a file or a directory is stored inside the link target */ -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0022-ntdll-Find-dangling-symlinks-quickly.patch b/patches/ntdll-Junction_Points/0022-ntdll-Find-dangling-symlinks-quickly.patch index f26b2621..1fb8f993 100644 --- a/patches/ntdll-Junction_Points/0022-ntdll-Find-dangling-symlinks-quickly.patch +++ b/patches/ntdll-Junction_Points/0022-ntdll-Find-dangling-symlinks-quickly.patch @@ -1,7 +1,7 @@ -From 2f1bed1d771ce85833c36a5f31e8a23ac655e33d Mon Sep 17 00:00:00 2001 +From 491f25543e5e15cc9f9c12da0d67665c79f53720 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 1 May 2019 17:48:51 -0600 -Subject: [PATCH] ntdll: Find dangling symlinks quickly. +Subject: ntdll: Find dangling symlinks quickly. This is also necessary on systems (such as MacOS) that support case-insensitive lookups of files. @@ -12,10 +12,10 @@ Signed-off-by: Erich E. Hoover 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index fcdc596ff74..c4efbc40878 100644 +index 42ae14851fa..cd7fca79d49 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -2730,7 +2730,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i +@@ -2723,7 +2723,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 fcdc596ff74..c4efbc40878 100644 } if (check_case) goto not_found; /* we want an exact match */ -@@ -3394,7 +3394,7 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer +@@ -3387,7 +3387,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 = '/'; @@ -34,5 +34,5 @@ index fcdc596ff74..c4efbc40878 100644 if (disposition == FILE_CREATE) return STATUS_OBJECT_NAME_COLLISION; return STATUS_SUCCESS; -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0023-server-Fix-obtaining-information-about-a-symlink.patch b/patches/ntdll-Junction_Points/0023-server-Fix-obtaining-information-about-a-symlink.patch index e979c78f..cc45978c 100644 --- a/patches/ntdll-Junction_Points/0023-server-Fix-obtaining-information-about-a-symlink.patch +++ b/patches/ntdll-Junction_Points/0023-server-Fix-obtaining-information-about-a-symlink.patch @@ -1,7 +1,7 @@ -From 42f756e849366ece3e83a7add81f7ddfbddcd0df Mon Sep 17 00:00:00 2001 +From c45352af86bac8dd17109990d94129ec3a14b4c4 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Sat, 18 Jul 2020 09:13:29 -0600 -Subject: [PATCH] server: Fix obtaining information about a symlink. +Subject: server: Fix obtaining information about a symlink. Signed-off-by: Erich E. Hoover --- @@ -11,10 +11,10 @@ Signed-off-by: Erich E. Hoover 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index c6a02995e99..9e27f848e90 100644 +index cd7fca79d49..49412c99d3c 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -1986,7 +1986,7 @@ static NTSTATUS fill_file_info( const struct stat *st, ULONG attr, void *ptr, +@@ -1982,7 +1982,7 @@ static NTSTATUS fill_file_info( const struct stat *st, ULONG attr, void *ptr, } @@ -23,7 +23,7 @@ index c6a02995e99..9e27f848e90 100644 { data_size_t size = 1024; NTSTATUS ret; -@@ -1999,6 +1999,7 @@ static NTSTATUS server_get_unix_name( HANDLE handle, char **unix_name ) +@@ -1995,6 +1995,7 @@ static NTSTATUS server_get_unix_name( HANDLE handle, char **unix_name ) SERVER_START_REQ( get_handle_unix_name ) { req->handle = wine_server_obj_handle( handle ); @@ -31,7 +31,7 @@ index c6a02995e99..9e27f848e90 100644 wine_server_set_reply( req, name, size ); ret = wine_server_call( req ); size = reply->name_len; -@@ -2194,7 +2195,7 @@ static NTSTATUS get_mountmgr_fs_info( HANDLE handle, int fd, struct mountmgr_uni +@@ -2190,7 +2191,7 @@ static NTSTATUS get_mountmgr_fs_info( HANDLE handle, int fd, struct mountmgr_uni NTSTATUS status; int letter; @@ -40,7 +40,7 @@ index c6a02995e99..9e27f848e90 100644 letter = find_dos_device( unix_name ); free( unix_name ); -@@ -4413,7 +4414,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, +@@ -4424,7 +4425,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, if (fd_get_file_info( fd, options, &st, &attr ) == -1) status = errno_to_status( errno ); else if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode)) status = STATUS_INVALID_INFO_CLASS; @@ -49,7 +49,7 @@ index c6a02995e99..9e27f848e90 100644 { LONG name_len = len - FIELD_OFFSET(FILE_ALL_INFORMATION, NameInformation.FileName); -@@ -4474,7 +4475,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, +@@ -4485,7 +4486,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, FILE_NAME_INFORMATION *info = ptr; char *unix_name; @@ -58,7 +58,7 @@ index c6a02995e99..9e27f848e90 100644 { LONG name_len = len - FIELD_OFFSET(FILE_NAME_INFORMATION, FileName); status = fill_name_info( unix_name, info, &name_len ); -@@ -4488,7 +4489,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, +@@ -4499,7 +4500,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, FILE_NETWORK_OPEN_INFORMATION *info = ptr; char *unix_name; @@ -67,7 +67,7 @@ index c6a02995e99..9e27f848e90 100644 { ULONG attributes; struct stat st; -@@ -6038,7 +6039,7 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer) +@@ -6048,7 +6049,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 c6a02995e99..9e27f848e90 100644 goto cleanup; src_allocated = TRUE; if (flags == SYMLINK_FLAG_RELATIVE) -@@ -6319,7 +6320,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out +@@ -6330,7 +6331,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG *si if ((status = server_get_unix_fd( handle, FILE_ANY_ACCESS, &dest_fd, &needs_close, NULL, NULL ))) return status; @@ -85,7 +85,7 @@ index c6a02995e99..9e27f848e90 100644 goto cleanup; if ((status = get_symlink_properties( unix_src, unix_dest, &unix_dest_len, &buffer->ReparseTag, -@@ -6437,7 +6438,7 @@ NTSTATUS remove_reparse_point(HANDLE handle, REPARSE_GUID_DATA_BUFFER *buffer) +@@ -6449,7 +6450,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 c6a02995e99..9e27f848e90 100644 goto cleanup; TRACE( "Deleting symlink %s\n", unix_name ); -@@ -7548,7 +7549,7 @@ NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_clas +@@ -7559,7 +7560,7 @@ NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_clas /* first try as a file object */ @@ -104,10 +104,10 @@ index c6a02995e99..9e27f848e90 100644 if (!(status = unix_to_nt_file_name( unix_name, &nt_name ))) { diff --git a/server/fd.c b/server/fd.c -index c8fa494caf9..525b13cbfc6 100644 +index b048568e85f..a82594f8513 100644 --- a/server/fd.c +++ b/server/fd.c -@@ -2849,11 +2849,12 @@ DECL_HANDLER(get_handle_unix_name) +@@ -2876,11 +2876,12 @@ DECL_HANDLER(get_handle_unix_name) if ((fd = get_handle_fd_obj( current->process, req->handle, 0 ))) { @@ -124,10 +124,10 @@ index c8fa494caf9..525b13cbfc6 100644 } else set_error( STATUS_OBJECT_TYPE_MISMATCH ); diff --git a/server/protocol.def b/server/protocol.def -index 133d6ad0552..126baf0073c 100644 +index c83e6a2ef7c..385420eedda 100644 --- a/server/protocol.def +++ b/server/protocol.def -@@ -1339,6 +1339,7 @@ enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT }; +@@ -1346,6 +1346,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 */ @@ -136,5 +136,5 @@ index 133d6ad0552..126baf0073c 100644 data_size_t name_len; /* unix name length */ VARARG(name,string); /* unix name */ -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0024-ntdll-Succeed-with-no-data-for-NtReadFile-on-reparse.patch b/patches/ntdll-Junction_Points/0024-ntdll-Succeed-with-no-data-for-NtReadFile-on-reparse.patch index 159e2128..47db9367 100644 --- a/patches/ntdll-Junction_Points/0024-ntdll-Succeed-with-no-data-for-NtReadFile-on-reparse.patch +++ b/patches/ntdll-Junction_Points/0024-ntdll-Succeed-with-no-data-for-NtReadFile-on-reparse.patch @@ -1,8 +1,9 @@ -From 7409071308f81f0a82f09c0d1e0133b6c7d94fa1 Mon Sep 17 00:00:00 2001 +From 88fc8873bb68ef3d9b816a5cae76c5d7e12a82f1 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Mon, 23 Nov 2020 13:08:02 -0700 -Subject: [PATCH] ntdll: Succeed with no data for NtReadFile on reparse points. +Subject: ntdll: Succeed with no data for NtReadFile on reparse points. +Signed-off-by: Erich E. Hoover --- dlls/ntdll/tests/file.c | 2 +- dlls/ntdll/unix/file.c | 5 +++++ @@ -24,10 +25,10 @@ index ebed2600920..cb9a9506aba 100644 CloseHandle(handle); diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index 4c0e864a011..a4bc4cd5898 100644 +index 49412c99d3c..f7ff9f4b5ed 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -5424,6 +5424,11 @@ NTSTATUS WINAPI NtReadFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, vo +@@ -5414,6 +5414,11 @@ NTSTATUS WINAPI NtReadFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, vo goto done; } } @@ -40,10 +41,10 @@ index 4c0e864a011..a4bc4cd5898 100644 if (type == FD_TYPE_SERIAL && async_read && length) { diff --git a/server/file.c b/server/file.c -index aff4d9e09e1..53c694177df 100644 +index 062322f685d..3079afdbdfd 100644 --- a/server/file.c +++ b/server/file.c -@@ -296,6 +296,7 @@ static enum server_fd_type file_get_fd_type( struct fd *fd ) +@@ -294,6 +294,7 @@ static enum server_fd_type file_get_fd_type( struct fd *fd ) { struct file *file = get_fd_user( fd ); @@ -52,10 +53,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 126baf0073c..43533b77143 100644 +index 385420eedda..0c259ed063f 100644 --- a/server/protocol.def +++ b/server/protocol.def -@@ -1359,6 +1359,7 @@ enum server_fd_type +@@ -1366,6 +1366,7 @@ enum server_fd_type { FD_TYPE_INVALID, /* invalid file (no associated fd) */ FD_TYPE_FILE, /* regular file */ @@ -64,5 +65,5 @@ index 126baf0073c..43533b77143 100644 FD_TYPE_SOCKET, /* socket */ FD_TYPE_SERIAL, /* serial port */ -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0025-ntdll-Support-reparse-point-properties-in-fd_get_fil.patch b/patches/ntdll-Junction_Points/0025-ntdll-Support-reparse-point-properties-in-fd_get_fil.patch index 86ddbb44..65b77f88 100644 --- a/patches/ntdll-Junction_Points/0025-ntdll-Support-reparse-point-properties-in-fd_get_fil.patch +++ b/patches/ntdll-Junction_Points/0025-ntdll-Support-reparse-point-properties-in-fd_get_fil.patch @@ -1,8 +1,9 @@ -From 20d3ffb9cfb71408f424fb4c2e760572f40c8846 Mon Sep 17 00:00:00 2001 +From e52191dc584a752128f9c945e5527f6a5b7de369 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 25 Nov 2020 09:05:51 -0700 -Subject: [PATCH] ntdll: Support reparse point properties in fd_get_file_info. +Subject: ntdll: Support reparse point properties in fd_get_file_info. +Signed-off-by: Erich E. Hoover --- dlls/ntdll/tests/file.c | 2 +- dlls/ntdll/unix/file.c | 26 +++++++++++++++++++------- @@ -22,10 +23,10 @@ index cb9a9506aba..cde3b86ade2 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 a4bc4cd5898..f275c36819e 100644 +index f7ff9f4b5ed..75194023e69 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 ) +@@ -1599,7 +1599,7 @@ static inline int get_file_xattr( char *hexattr, int attrlen ) return 0; } @@ -34,7 +35,7 @@ index a4bc4cd5898..f275c36819e 100644 DWORD *tag, ULONG *flags, BOOL *is_dir); /* fetch the attributes of a file */ -@@ -1640,10 +1640,22 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON +@@ -1633,10 +1633,22 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON *attr = 0; ret = fstat( fd, st ); if (ret == -1) return ret; @@ -58,7 +59,7 @@ index a4bc4cd5898..f275c36819e 100644 return ret; } -@@ -1702,7 +1714,7 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr ) +@@ -1695,7 +1707,7 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr ) /* symbolic links (either junction points or NT symlinks) are "reparse points" */ *attr |= FILE_ATTRIBUTE_REPARSE_POINT; /* whether a reparse point is a file or a directory is stored inside the link target */ @@ -67,7 +68,7 @@ index a4bc4cd5898..f275c36819e 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 ))) -@@ -6241,7 +6253,7 @@ cleanup: +@@ -6231,7 +6243,7 @@ cleanup: } @@ -76,7 +77,7 @@ index a4bc4cd5898..f275c36819e 100644 DWORD *tag, ULONG *flags, BOOL *is_dir) { int len = MAX_PATH; -@@ -6257,7 +6269,7 @@ NTSTATUS get_symlink_properties(const char *unix_src, char *unix_dest, int *unix +@@ -6247,7 +6259,7 @@ NTSTATUS get_symlink_properties(const char *unix_src, char *unix_dest, int *unix tmp = malloc( len ); else tmp = unix_dest; @@ -85,7 +86,7 @@ index a4bc4cd5898..f275c36819e 100644 { status = errno_to_status( errno ); goto cleanup; -@@ -6348,8 +6360,8 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out +@@ -6339,8 +6351,8 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG *si if ((status = server_get_unix_name( handle, &unix_src, TRUE ))) goto cleanup; @@ -97,5 +98,5 @@ index a4bc4cd5898..f275c36819e 100644 /* convert the relative path into an absolute path */ -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0026-ntdll-Add-support-for-FileAttributeTagInformation.patch b/patches/ntdll-Junction_Points/0026-ntdll-Add-support-for-FileAttributeTagInformation.patch index 9c3219ea..0945ce55 100644 --- a/patches/ntdll-Junction_Points/0026-ntdll-Add-support-for-FileAttributeTagInformation.patch +++ b/patches/ntdll-Junction_Points/0026-ntdll-Add-support-for-FileAttributeTagInformation.patch @@ -1,8 +1,9 @@ -From 9383c4e7c2f5862cdaa05f01f5591212f988d6df Mon Sep 17 00:00:00 2001 +From c908729cdf6a62f259f20a24ab287b056f09326b Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 25 Nov 2020 09:19:42 -0700 -Subject: [PATCH] ntdll: Add support for FileAttributeTagInformation. +Subject: ntdll: Add support for FileAttributeTagInformation. +Signed-off-by: Erich E. Hoover --- dlls/ntdll/tests/file.c | 6 ++++++ dlls/ntdll/unix/file.c | 4 +++- @@ -40,10 +41,10 @@ index cde3b86ade2..18887895e40 100644 /* Check the size/data of the symlink target */ diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index f275c36819e..26d482638cc 100644 +index 75194023e69..a01c31413ad 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -4552,7 +4552,9 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, +@@ -4561,7 +4561,9 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, { FILE_ATTRIBUTE_TAG_INFORMATION *info = ptr; info->FileAttributes = attr; @@ -55,5 +56,5 @@ index f275c36819e..26d482638cc 100644 info->ReparseTag = IO_REPARSE_TAG_MOUNT_POINT; } -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0027-kernel32-Implement-CreateSymbolicLink-A-W-with-ntdll.patch b/patches/ntdll-Junction_Points/0027-kernel32-Implement-CreateSymbolicLink-A-W-with-ntdll.patch index 11edb68c..9c5f0729 100644 --- a/patches/ntdll-Junction_Points/0027-kernel32-Implement-CreateSymbolicLink-A-W-with-ntdll.patch +++ b/patches/ntdll-Junction_Points/0027-kernel32-Implement-CreateSymbolicLink-A-W-with-ntdll.patch @@ -1,8 +1,8 @@ -From 95841ecb8dce655e76e90276c38a9ea4bab47d18 Mon Sep 17 00:00:00 2001 +From 77515fff89d1e21aa47d3a95aacc5138054cdb77 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 13 Mar 2019 16:02:05 -0600 -Subject: [PATCH] kernel32: Implement CreateSymbolicLink[A|W] with ntdll - reparse points. +Subject: kernel32: Implement CreateSymbolicLink[A|W] with ntdll reparse + points. Signed-off-by: Erich E. Hoover --- @@ -14,10 +14,10 @@ Signed-off-by: Erich E. Hoover 5 files changed, 266 insertions(+), 81 deletions(-) diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c -index 023dff826d6..29bbb5948ff 100644 +index 957e9fca01d..ca2868c5635 100644 --- a/dlls/kernel32/path.c +++ b/dlls/kernel32/path.c -@@ -350,8 +350,16 @@ WCHAR * CDECL wine_get_dos_file_name( LPCSTR str ) +@@ -352,8 +352,16 @@ WCHAR * CDECL wine_get_dos_file_name( LPCSTR str ) */ BOOLEAN WINAPI CreateSymbolicLinkA(LPCSTR link, LPCSTR target, DWORD flags) { @@ -37,7 +37,7 @@ index 023dff826d6..29bbb5948ff 100644 /************************************************************************* diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c -index f49af6d5bfe..bc2cd84a65d 100644 +index 2955be0da9c..78326fc8bb1 100644 --- a/dlls/kernel32/tests/path.c +++ b/dlls/kernel32/tests/path.c @@ -83,6 +83,9 @@ static NTSTATUS (WINAPI *pLdrGetDllPath)(LPCWSTR,ULONG,LPWSTR*,LPWSTR*); @@ -58,7 +58,7 @@ index f49af6d5bfe..bc2cd84a65d 100644 mod = GetModuleHandleA("ntdll.dll"); MAKEFUNC(LdrGetDllPath); MAKEFUNC(RtlGetExePath); -@@ -2691,6 +2695,95 @@ static void test_LdrGetDllPath(void) +@@ -2734,6 +2738,95 @@ static void test_LdrGetDllPath(void) SetEnvironmentVariableW( pathW, old_path ); } @@ -154,14 +154,14 @@ index f49af6d5bfe..bc2cd84a65d 100644 START_TEST(path) { CHAR origdir[MAX_PATH],curdir[MAX_PATH], curDrive, otherDrive; -@@ -2720,4 +2813,5 @@ START_TEST(path) +@@ -2763,4 +2856,5 @@ START_TEST(path) test_RtlGetSearchPath(); test_RtlGetExePath(); test_LdrGetDllPath(); + test_CreateSymbolicLink(); } diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c -index 80497c1ac97..68de99a2516 100644 +index 904a4f0979f..e44a5755460 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c @@ -38,6 +38,7 @@ @@ -172,7 +172,7 @@ index 80497c1ac97..68de99a2516 100644 #include "kernelbase.h" #include "wine/exception.h" -@@ -938,8 +939,106 @@ done: +@@ -940,8 +941,106 @@ done: */ BOOLEAN WINAPI /* DECLSPEC_HOTPATCH */ CreateSymbolicLinkW( LPCWSTR link, LPCWSTR target, DWORD flags ) { @@ -424,7 +424,7 @@ index 495ee9dd6fb..c982be0c10e 100644 } diff --git a/dlls/msvcp140/tests/msvcp140.c b/dlls/msvcp140/tests/msvcp140.c -index 8a3771842a0..a55998e0d79 100644 +index c79e425190b..f3b98ec4e73 100644 --- a/dlls/msvcp140/tests/msvcp140.c +++ b/dlls/msvcp140/tests/msvcp140.c @@ -787,16 +787,15 @@ static void test_Stat(void) @@ -535,5 +535,5 @@ index 8a3771842a0..a55998e0d79 100644 } -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0028-kernel32-Add-reparse-support-to-FindNextFile.patch b/patches/ntdll-Junction_Points/0028-kernel32-Add-reparse-support-to-FindNextFile.patch index 87cf3443..0243baa6 100644 --- a/patches/ntdll-Junction_Points/0028-kernel32-Add-reparse-support-to-FindNextFile.patch +++ b/patches/ntdll-Junction_Points/0028-kernel32-Add-reparse-support-to-FindNextFile.patch @@ -1,7 +1,7 @@ -From 3d4e45425405324ac5ac7716c7efb399e0e239fe Mon Sep 17 00:00:00 2001 +From c778a312bce6674c23fffb06b82b36fcd8e1ff15 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 29 May 2019 15:11:42 -0600 -Subject: [PATCH] kernel32: Add reparse support to FindNextFile. +Subject: kernel32: Add reparse support to FindNextFile. Signed-off-by: Erich E. Hoover --- @@ -9,10 +9,10 @@ Signed-off-by: Erich E. Hoover 1 file changed, 24 insertions(+) diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c -index 68de99a2516..820f73a38cc 100644 +index e44a5755460..b3926ade9d5 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c -@@ -1497,6 +1497,30 @@ BOOL WINAPI DECLSPEC_HOTPATCH FindNextFileW( HANDLE handle, WIN32_FIND_DATAW *da +@@ -1499,6 +1499,30 @@ BOOL WINAPI DECLSPEC_HOTPATCH FindNextFileW( HANDLE handle, WIN32_FIND_DATAW *da memcpy( data->cFileName, dir_info->FileName, dir_info->FileNameLength ); data->cFileName[dir_info->FileNameLength/sizeof(WCHAR)] = 0; @@ -44,5 +44,5 @@ index 68de99a2516..820f73a38cc 100644 { memcpy( data->cAlternateFileName, dir_info->ShortName, dir_info->ShortNameLength ); -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0029-wcmd-Display-reparse-point-type-in-directory-listing.patch b/patches/ntdll-Junction_Points/0029-wcmd-Display-reparse-point-type-in-directory-listing.patch index 8bfd647b..bee05eac 100644 --- a/patches/ntdll-Junction_Points/0029-wcmd-Display-reparse-point-type-in-directory-listing.patch +++ b/patches/ntdll-Junction_Points/0029-wcmd-Display-reparse-point-type-in-directory-listing.patch @@ -1,7 +1,7 @@ -From 599164cd8f25f0ca4ebd4aaa0082148aa7d28305 Mon Sep 17 00:00:00 2001 +From 3eee2d48450f815b03f31f4b7c16accfbb8607b6 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 29 May 2019 15:18:50 -0600 -Subject: [PATCH] wcmd: Display reparse point type in directory listings. +Subject: wcmd: Display reparse point type in directory listings. Signed-off-by: Erich E. Hoover --- @@ -46,5 +46,5 @@ index 24b18bfa81b..40554aed368 100644 dir_count++; -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0030-wcmd-Show-reparse-point-target-in-directory-listing.patch b/patches/ntdll-Junction_Points/0030-wcmd-Show-reparse-point-target-in-directory-listing.patch index c08b5e03..3e62f158 100644 --- a/patches/ntdll-Junction_Points/0030-wcmd-Show-reparse-point-target-in-directory-listing.patch +++ b/patches/ntdll-Junction_Points/0030-wcmd-Show-reparse-point-target-in-directory-listing.patch @@ -1,7 +1,7 @@ -From 6c096dfae64576b5b4e9b234ba11652218ece159 Mon Sep 17 00:00:00 2001 +From f6b36e58a07343ba7056873f82da376eb8895557 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 29 May 2019 15:38:30 -0600 -Subject: [PATCH] wcmd: Show reparse point target in directory listing. +Subject: wcmd: Show reparse point target in directory listing. Signed-off-by: Erich E. Hoover --- @@ -62,5 +62,5 @@ index 40554aed368..0618ffec8d1 100644 if (!((lstrcmpW(fd[i].cFileName, L".") == 0) || (lstrcmpW(fd[i].cFileName, L"..") == 0))) { -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0031-wcmd-Add-junction-point-support-to-mklink.patch b/patches/ntdll-Junction_Points/0031-wcmd-Add-junction-point-support-to-mklink.patch index c877687b..ba472c56 100644 --- a/patches/ntdll-Junction_Points/0031-wcmd-Add-junction-point-support-to-mklink.patch +++ b/patches/ntdll-Junction_Points/0031-wcmd-Add-junction-point-support-to-mklink.patch @@ -1,7 +1,7 @@ -From 884a569d5fbfb51a5e0d734a47c23e4864dbfa72 Mon Sep 17 00:00:00 2001 +From f9d43a6e8272e1be5c375a88e0f9b7aadf552213 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 29 May 2019 16:01:45 -0600 -Subject: [PATCH] wcmd: Add junction point support to mklink. +Subject: wcmd: Add junction point support to mklink. Signed-off-by: Erich E. Hoover --- @@ -9,7 +9,7 @@ Signed-off-by: Erich E. Hoover 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c -index c7df724ae00..18c8197f369 100644 +index 29e1e6a5767..a34cfdbe553 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -31,6 +31,9 @@ @@ -22,7 +22,7 @@ index c7df724ae00..18c8197f369 100644 WINE_DEFAULT_DEBUG_CHANNEL(cmd); -@@ -4969,6 +4972,49 @@ void WCMD_color (void) { +@@ -4970,6 +4973,49 @@ void WCMD_color (void) { } } @@ -72,7 +72,7 @@ index c7df724ae00..18c8197f369 100644 /**************************************************************************** * WCMD_mklink */ -@@ -5017,7 +5063,7 @@ void WCMD_mklink(WCHAR *args) +@@ -5018,7 +5064,7 @@ void WCMD_mklink(WCHAR *args) else if(!junction) ret = CreateSymbolicLinkW(file1, file2, isdir); else @@ -82,5 +82,5 @@ index c7df724ae00..18c8197f369 100644 if(!ret) WCMD_output_stderr(WCMD_LoadMessage(WCMD_READFAIL), file1); -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0032-server-Properly-handle-renames-involving-symlinks.patch b/patches/ntdll-Junction_Points/0032-server-Properly-handle-renames-involving-symlinks.patch index 56ee0820..a8f54375 100644 --- a/patches/ntdll-Junction_Points/0032-server-Properly-handle-renames-involving-symlinks.patch +++ b/patches/ntdll-Junction_Points/0032-server-Properly-handle-renames-involving-symlinks.patch @@ -1,17 +1,18 @@ -From f097a3e32d4c262f3cb44bbbca652b743526d951 Mon Sep 17 00:00:00 2001 +From a005fdcb0954856703625dba6085be823b77e137 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Sat, 6 Feb 2021 12:17:23 -0700 -Subject: [PATCH] server: Properly handle renames involving symlinks. +Subject: server: Properly handle renames involving symlinks. +Signed-off-by: Erich E. Hoover --- server/fd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/fd.c b/server/fd.c -index 525b13cbfc6..a43cc033f02 100644 +index a82594f8513..5cd76f1b0e0 100644 --- a/server/fd.c +++ b/server/fd.c -@@ -2645,7 +2645,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da +@@ -2670,7 +2670,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da goto failed; } @@ -20,7 +21,7 @@ index 525b13cbfc6..a43cc033f02 100644 { if (!fstat( fd->unix_fd, &st2 ) && st.st_ino == st2.st_ino && st.st_dev == st2.st_dev) { -@@ -2661,7 +2661,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da +@@ -2686,7 +2686,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da } /* can't replace directories or special files */ @@ -29,7 +30,7 @@ index 525b13cbfc6..a43cc033f02 100644 { set_error( STATUS_ACCESS_DENIED ); goto failed; -@@ -2721,6 +2721,8 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da +@@ -2746,6 +2746,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 ); @@ -39,5 +40,5 @@ index 525b13cbfc6..a43cc033f02 100644 set_error( STATUS_NO_MEMORY ); return; -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0033-kernelbase-Use-FILE_OPEN_REPARSE_POINT-in-MoveFileWi.patch b/patches/ntdll-Junction_Points/0033-kernelbase-Use-FILE_OPEN_REPARSE_POINT-in-MoveFileWi.patch index c9e4fa26..a3ab13c9 100644 --- a/patches/ntdll-Junction_Points/0033-kernelbase-Use-FILE_OPEN_REPARSE_POINT-in-MoveFileWi.patch +++ b/patches/ntdll-Junction_Points/0033-kernelbase-Use-FILE_OPEN_REPARSE_POINT-in-MoveFileWi.patch @@ -1,18 +1,18 @@ -From 82001304e8f4c91106036c9e166fc88add3197fe Mon Sep 17 00:00:00 2001 +From 81ca19d4ab038357e8df6c91fa0aab8dc2114fe5 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Sat, 6 Feb 2021 12:46:30 -0700 -Subject: [PATCH] kernelbase: Use FILE_OPEN_REPARSE_POINT in - MoveFileWithProgress. +Subject: kernelbase: Use FILE_OPEN_REPARSE_POINT in MoveFileWithProgress. +Signed-off-by: Erich E. Hoover --- 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 820f73a38cc..7ad352d3451 100644 +index b3926ade9d5..1d793af8bd1 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c -@@ -2583,7 +2583,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH MoveFileWithProgressW( const WCHAR *source, const +@@ -2585,7 +2585,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH MoveFileWithProgressW( const WCHAR *source, const status = NtOpenFile( &source_handle, DELETE | SYNCHRONIZE, &attr, &io, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, @@ -22,5 +22,5 @@ index 820f73a38cc..7ad352d3451 100644 if (!set_ntstatus( status )) goto error; -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0034-kernelbase-Use-FILE_OPEN_REPARSE_POINT-in-DeleteFile.patch b/patches/ntdll-Junction_Points/0034-kernelbase-Use-FILE_OPEN_REPARSE_POINT-in-DeleteFile.patch index ea20fd55..27c604dc 100644 --- a/patches/ntdll-Junction_Points/0034-kernelbase-Use-FILE_OPEN_REPARSE_POINT-in-DeleteFile.patch +++ b/patches/ntdll-Junction_Points/0034-kernelbase-Use-FILE_OPEN_REPARSE_POINT-in-DeleteFile.patch @@ -1,17 +1,18 @@ -From 5b4684487296a767a8c4c7ab6da662d909dc1fd2 Mon Sep 17 00:00:00 2001 +From 2c64ce2bbda215d3a37a6e578d4902d5ec1c54cb Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Sat, 6 Feb 2021 12:52:51 -0700 -Subject: [PATCH] kernelbase: Use FILE_OPEN_REPARSE_POINT in DeleteFile. +Subject: kernelbase: Use FILE_OPEN_REPARSE_POINT in DeleteFile. +Signed-off-by: Erich E. Hoover --- dlls/kernelbase/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c -index 7ad352d3451..b96de9948b8 100644 +index 1d793af8bd1..21c7a59ac13 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c -@@ -1082,7 +1082,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH DeleteFileW( LPCWSTR path ) +@@ -1084,7 +1084,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH DeleteFileW( LPCWSTR path ) status = NtCreateFile(&hFile, SYNCHRONIZE | DELETE, &attr, &io, NULL, 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, @@ -22,5 +23,5 @@ index 7ad352d3451..b96de9948b8 100644 RtlFreeUnicodeString( &nameW ); -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0035-ntdll-Treat-undecoded-unix-symlinks-as-WSL-Linux-Uni.patch b/patches/ntdll-Junction_Points/0035-ntdll-Treat-undecoded-unix-symlinks-as-WSL-Linux-Uni.patch index f41a3d21..f79befe3 100644 --- a/patches/ntdll-Junction_Points/0035-ntdll-Treat-undecoded-unix-symlinks-as-WSL-Linux-Uni.patch +++ b/patches/ntdll-Junction_Points/0035-ntdll-Treat-undecoded-unix-symlinks-as-WSL-Linux-Uni.patch @@ -1,9 +1,9 @@ -From be43222b39420cff283ac52b8ae5a6781c42e701 Mon Sep 17 00:00:00 2001 +From e4bb20ab33783828a03455ad59d940783f644728 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Sat, 6 Feb 2021 16:32:44 -0700 -Subject: [PATCH] ntdll: Treat undecoded unix symlinks as WSL Linux/Unix - symlinks. +Subject: ntdll: Treat undecoded unix symlinks as WSL Linux/Unix symlinks. +Signed-off-by: Erich E. Hoover --- dlls/ntdll/unix/file.c | 62 ++++++++++++++++++++++++------------------ include/ntifs.h | 4 +++ @@ -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 26d482638cc..ec4188a1c8c 100644 +index a01c31413ad..752561931ab 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -6258,9 +6258,10 @@ cleanup: +@@ -6248,9 +6248,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 26d482638cc..ec4188a1c8c 100644 BOOL dir_flag; char *p, *tmp; ssize_t ret; -@@ -6287,10 +6288,7 @@ NTSTATUS get_symlink_properties(int fd, const char *unix_src, char *unix_dest, i +@@ -6277,10 +6278,7 @@ NTSTATUS get_symlink_properties(int fd, const char *unix_src, char *unix_dest, i p++; } if (*p++ != '/') @@ -38,7 +38,7 @@ index 26d482638cc..ec4188a1c8c 100644 reparse_tag = 0; for (i = 0; i < sizeof(ULONG)*8; i++) { -@@ -6302,10 +6300,7 @@ NTSTATUS get_symlink_properties(int fd, const char *unix_src, char *unix_dest, i +@@ -6292,10 +6290,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 26d482638cc..ec4188a1c8c 100644 reparse_tag |= (val << i); } /* skip past the directory/file flag */ -@@ -6318,19 +6313,31 @@ NTSTATUS get_symlink_properties(int fd, const char *unix_src, char *unix_dest, i +@@ -6308,19 +6303,31 @@ NTSTATUS get_symlink_properties(int fd, const char *unix_src, char *unix_dest, i else if (c == '.' && *p++ == '/') dir_flag = TRUE; else @@ -73,7 +73,7 @@ index 26d482638cc..ec4188a1c8c 100644 + p = tmp; + reparse_tag = IO_REPARSE_TAG_LX_SYMLINK; + if (flags && *p != '/') *flags = SYMLINK_FLAG_RELATIVE; -+ if (!stat( tmp, &st )) ++ if (!fstatat( fd, unix_src, &st, 0 )) + dir_flag = S_ISDIR(st.st_mode); + else + dir_flag = FALSE; /* treat dangling symlinks as files */ @@ -87,9 +87,9 @@ index 26d482638cc..ec4188a1c8c 100644 cleanup: if (!unix_dest) free( tmp ); -@@ -6344,9 +6351,9 @@ cleanup: +@@ -6334,9 +6341,9 @@ cleanup: */ - 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) { + VOID *subst_name = NULL, *print_name = NULL, *unix_name = NULL; INT prefix_len, path_len, total_len; @@ -98,7 +98,7 @@ index 26d482638cc..ec4188a1c8c 100644 SIZE_T nt_dest_len = PATH_MAX; int unix_dest_len = PATH_MAX; BOOL dest_allocated = FALSE; -@@ -6411,6 +6418,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out +@@ -6402,6 +6409,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG *si { case IO_REPARSE_TAG_MOUNT_POINT: max_length = out_size-FIELD_OFFSET(typeof(*buffer), MountPointReparseBuffer.PathBuffer[1]); @@ -106,7 +106,7 @@ index 26d482638cc..ec4188a1c8c 100644 path_len = 0; buffer->MountPointReparseBuffer.SubstituteNameOffset = path_len; buffer->MountPointReparseBuffer.SubstituteNameLength = nt_dest_len; -@@ -6424,6 +6432,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out +@@ -6415,6 +6423,7 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG *si break; case IO_REPARSE_TAG_SYMLINK: max_length = out_size-FIELD_OFFSET(typeof(*buffer), SymbolicLinkReparseBuffer.PathBuffer[1]); @@ -114,7 +114,7 @@ index 26d482638cc..ec4188a1c8c 100644 path_len = 0; buffer->SymbolicLinkReparseBuffer.SubstituteNameOffset = path_len; buffer->SymbolicLinkReparseBuffer.SubstituteNameLength = nt_dest_len; -@@ -6437,19 +6446,20 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out +@@ -6428,19 +6437,20 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG *si buffer->SymbolicLinkReparseBuffer.Flags = flags; break; default: @@ -143,9 +143,9 @@ index 26d482638cc..ec4188a1c8c 100644 + if (subst_name) memcpy( subst_name, nt_dest, nt_dest_len ); + if (print_name) memcpy( print_name, &nt_dest[prefix_len], nt_dest_len - prefix_len*sizeof(WCHAR) ); + if (unix_name) memcpy( unix_name, unix_dest, unix_dest_len ); + *size = total_len; buffer->ReparseDataLength = total_len - FIELD_OFFSET(typeof(*buffer), GenericReparseBuffer); status = STATUS_SUCCESS; - diff --git a/include/ntifs.h b/include/ntifs.h index 0d02225bc4f..25af12a413a 100644 --- a/include/ntifs.h @@ -162,10 +162,10 @@ index 0d02225bc4f..25af12a413a 100644 UCHAR DataBuffer[1]; } GenericReparseBuffer; diff --git a/include/winnt.h b/include/winnt.h -index b83f588a16d..56baca5a0dd 100644 +index 425998702d6..1dd4d0109ba 100644 --- a/include/winnt.h +++ b/include/winnt.h -@@ -2226,6 +2226,7 @@ extern struct _TEB * WINAPI NtCurrentTeb(void); +@@ -2245,6 +2245,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) @@ -174,5 +174,5 @@ index b83f588a16d..56baca5a0dd 100644 #define IO_REPARSE_TAG_WCI_TOMBSTONE __MSABI_LONG(0xA000001F) #define IO_REPARSE_TAG_UNHANDLED __MSABI_LONG(0x80000020) -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0036-ntdll-Add-support-for-creating-Unix-Linux-symlinks.patch b/patches/ntdll-Junction_Points/0036-ntdll-Add-support-for-creating-Unix-Linux-symlinks.patch index cdd5ee92..08d3ddfd 100644 --- a/patches/ntdll-Junction_Points/0036-ntdll-Add-support-for-creating-Unix-Linux-symlinks.patch +++ b/patches/ntdll-Junction_Points/0036-ntdll-Add-support-for-creating-Unix-Linux-symlinks.patch @@ -1,8 +1,9 @@ -From dd5c6b79e5acb821669af1a99d822a37a6cbe1bd Mon Sep 17 00:00:00 2001 +From 96a9115e57cee4a11675d1fff5125155b6b213fb Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Mon, 3 May 2021 09:28:08 -0600 -Subject: [PATCH] ntdll: Add support for creating Unix/Linux symlinks. +Subject: ntdll: Add support for creating Unix/Linux symlinks. +Signed-off-by: Erich E. Hoover --- dlls/ntdll/tests/file.c | 43 +++++++++++++++++++++++++++++++++++++++++ dlls/ntdll/unix/file.c | 30 ++++++++++++++++++++-------- @@ -71,10 +72,10 @@ index 18887895e40..bff3b18ce83 100644 /* Cleanup */ pRtlFreeUnicodeString(&nameW); diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index ec4188a1c8c..31b64cbaabe 100644 +index 752561931ab..0c2117ca801 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -6041,18 +6041,18 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer) +@@ -6031,18 +6031,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 +97,7 @@ index ec4188a1c8c..31b64cbaabe 100644 ULONG flags; int i; -@@ -6070,6 +6070,12 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer) +@@ -6060,6 +6060,12 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer) dest = &buffer->SymbolicLinkReparseBuffer.PathBuffer[offset]; flags = buffer->SymbolicLinkReparseBuffer.Flags; break; @@ -109,7 +110,7 @@ index ec4188a1c8c..31b64cbaabe 100644 default: FIXME("stub: FSCTL_SET_REPARSE_POINT(%x)\n", buffer->ReparseTag); return STATUS_NOT_IMPLEMENTED; -@@ -6081,6 +6087,9 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer) +@@ -6071,6 +6077,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 +120,7 @@ index ec4188a1c8c..31b64cbaabe 100644 if (flags == SYMLINK_FLAG_RELATIVE) { SIZE_T nt_path_len = PATH_MAX, unix_path_len = PATH_MAX; -@@ -6156,6 +6165,8 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer) +@@ -6146,6 +6155,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 +129,7 @@ index ec4188a1c8c..31b64cbaabe 100644 /* check that the source and destination paths are the same up to the relative path */ if (flags == SYMLINK_FLAG_RELATIVE) { -@@ -6171,14 +6182,17 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer) +@@ -6161,14 +6172,17 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer) /* Encode the reparse tag into the symlink */ strcpy( magic_dest, "" ); @@ -152,5 +153,5 @@ index ec4188a1c8c..31b64cbaabe 100644 /* Encode the type (file or directory) if NT symlink */ if (buffer->ReparseTag == IO_REPARSE_TAG_SYMLINK) -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0037-ntdll-Strip-the-wine-prefix-from-reparse-point-paths.patch b/patches/ntdll-Junction_Points/0037-ntdll-Strip-the-wine-prefix-from-reparse-point-paths.patch index d7401ad6..27170e8b 100644 --- a/patches/ntdll-Junction_Points/0037-ntdll-Strip-the-wine-prefix-from-reparse-point-paths.patch +++ b/patches/ntdll-Junction_Points/0037-ntdll-Strip-the-wine-prefix-from-reparse-point-paths.patch @@ -1,18 +1,19 @@ -From ae8bab9e6096fc775a9e616c8661626a278be4b8 Mon Sep 17 00:00:00 2001 +From 0e5ab82fbcc56e61c6290fed5451ab9d5d3ef997 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Sat, 6 Feb 2021 16:15:46 -0700 -Subject: [PATCH] ntdll: Strip the wine prefix from reparse point paths - external to the prefix. +Subject: ntdll: Strip the wine prefix from reparse point paths external to the + prefix. +Signed-off-by: Erich E. Hoover --- dlls/ntdll/unix/file.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index 31b64cbaabe..8ca19497c64 100644 +index 0c2117ca801..19a9584d4b3 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -6033,6 +6033,33 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer, +@@ -6023,6 +6023,33 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer, } @@ -46,7 +47,7 @@ index 31b64cbaabe..8ca19497c64 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. -@@ -6177,6 +6204,8 @@ have_dest: +@@ -6167,6 +6194,8 @@ have_dest: goto cleanup; } } @@ -56,5 +57,5 @@ index 31b64cbaabe..8ca19497c64 100644 TRACE( "Linking %s to %s\n", unix_src, &unix_dest[relative_offset] ); -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0038-ntdll-Add-a-marker-to-reparse-point-paths-to-indicat.patch b/patches/ntdll-Junction_Points/0038-ntdll-Add-a-marker-to-reparse-point-paths-to-indicat.patch index e800f110..6c8ab16b 100644 --- a/patches/ntdll-Junction_Points/0038-ntdll-Add-a-marker-to-reparse-point-paths-to-indicat.patch +++ b/patches/ntdll-Junction_Points/0038-ntdll-Add-a-marker-to-reparse-point-paths-to-indicat.patch @@ -1,18 +1,19 @@ -From 2ff81d88c65aec422390f6099b92c37d3a8e623c Mon Sep 17 00:00:00 2001 +From d250faa15d183fa34718a23806853dcd50b9c653 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Sat, 6 Feb 2021 16:16:17 -0700 -Subject: [PATCH] ntdll: Add a marker to reparse point paths to indicate the - prefix location. +Subject: ntdll: Add a marker to reparse point paths to indicate the prefix + location. +Signed-off-by: Erich E. Hoover --- dlls/ntdll/unix/file.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index 8ca19497c64..806b7b4465e 100644 +index 19a9584d4b3..984d6e46cb9 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -6060,6 +6060,26 @@ void strip_external_path( char *path, SIZE_T *len ) +@@ -6050,6 +6050,26 @@ void strip_external_path( char *path, SIZE_T *len ) } @@ -39,7 +40,7 @@ index 8ca19497c64..806b7b4465e 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. -@@ -6205,7 +6225,10 @@ have_dest: +@@ -6195,7 +6215,10 @@ have_dest: } } else @@ -51,5 +52,5 @@ index 8ca19497c64..806b7b4465e 100644 TRACE( "Linking %s to %s\n", unix_src, &unix_dest[relative_offset] ); -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Junction_Points/0039-server-Rewrite-absolute-reparse-point-targets-if-the.patch b/patches/ntdll-Junction_Points/0039-server-Rewrite-absolute-reparse-point-targets-if-the.patch index 63bea6f5..b8ae9fc7 100644 --- a/patches/ntdll-Junction_Points/0039-server-Rewrite-absolute-reparse-point-targets-if-the.patch +++ b/patches/ntdll-Junction_Points/0039-server-Rewrite-absolute-reparse-point-targets-if-the.patch @@ -1,18 +1,19 @@ -From c1b5b6a205239efd567449dafa2bd8ec39178a1e Mon Sep 17 00:00:00 2001 +From 737fd051ea7b6dcba36fff41a3eb78fb1859eaa7 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Sat, 6 Feb 2021 16:15:03 -0700 -Subject: [PATCH] server: Rewrite absolute reparse point targets if the prefix - location changes. +Subject: server: Rewrite absolute reparse point targets if the prefix location + changes. +Signed-off-by: Erich E. Hoover --- server/fd.c | 85 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 69 insertions(+), 16 deletions(-) diff --git a/server/fd.c b/server/fd.c -index a43cc033f02..1f7ba38651b 100644 +index 5cd76f1b0e0..45a1b226f33 100644 --- a/server/fd.c +++ b/server/fd.c -@@ -1899,23 +1899,16 @@ void get_nt_name( struct fd *fd, struct unicode_str *name ) +@@ -1906,23 +1906,16 @@ void get_nt_name( struct fd *fd, struct unicode_str *name ) name->len = fd->nt_namelen; } @@ -40,7 +41,7 @@ index a43cc033f02..1f7ba38651b 100644 link[len] = 0; p = link; /* skip past relative/absolute indication */ -@@ -1923,7 +1916,7 @@ static void decode_symlink(char *name, int *is_dir) +@@ -1930,7 +1923,7 @@ static void decode_symlink(char *name, int *is_dir) p++; if (*p++ != '/') { @@ -49,7 +50,7 @@ index a43cc033f02..1f7ba38651b 100644 } /* decode the reparse tag */ reparse_tag = 0; -@@ -1937,7 +1930,7 @@ static void decode_symlink(char *name, int *is_dir) +@@ -1944,7 +1937,7 @@ static void decode_symlink(char *name, int *is_dir) else if (c == '.' && *p++ == '/') val = 1; else @@ -58,7 +59,7 @@ index a43cc033f02..1f7ba38651b 100644 reparse_tag |= (val << i); } /* decode the directory/file flag */ -@@ -1950,10 +1943,70 @@ static void decode_symlink(char *name, int *is_dir) +@@ -1957,10 +1950,70 @@ static void decode_symlink(char *name, int *is_dir) else if (c == '.' && *p++ == '/') *is_dir = TRUE; else @@ -130,7 +131,7 @@ index a43cc033f02..1f7ba38651b 100644 } /* open() wrapper that returns a struct fd with no fd user set */ -@@ -2019,7 +2072,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam +@@ -2026,7 +2079,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 +140,7 @@ index a43cc033f02..1f7ba38651b 100644 #if defined(O_SYMLINK) if (is_symlink && (options & FILE_OPEN_REPARSE_POINT) && !(flags & O_CREAT)) flags |= O_SYMLINK; -@@ -2079,7 +2132,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam +@@ -2086,7 +2139,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) @@ -149,5 +150,5 @@ index a43cc033f02..1f7ba38651b 100644 /* check directory options */ if ((options & FILE_DIRECTORY_FILE) && !is_dir) -- -2.30.2 +2.17.1 diff --git a/patches/ntdll-Serial_Port_Detection/0001-ntdll-Do-a-device-check-before-returning-a-default-s.patch b/patches/ntdll-Serial_Port_Detection/0001-ntdll-Do-a-device-check-before-returning-a-default-s.patch index d1af558e..5ad0cbcb 100644 --- a/patches/ntdll-Serial_Port_Detection/0001-ntdll-Do-a-device-check-before-returning-a-default-s.patch +++ b/patches/ntdll-Serial_Port_Detection/0001-ntdll-Do-a-device-check-before-returning-a-default-s.patch @@ -1,4 +1,4 @@ -From 57842b80ce2211e1ec909062b381ccd099ad5fb4 Mon Sep 17 00:00:00 2001 +From 6417963f31677985e181baaa61297671cdf26543 Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Tue, 29 Dec 2015 00:48:02 -0700 Subject: [PATCH] mountmgr.sys: Do a device check before returning a default @@ -12,10 +12,10 @@ Fixes https://bugs.winehq.org/show_bug.cgi?id=39793 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c -index 332f390550d..6343807e14d 100644 +index 8c2808bb643..57ae874b247 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c -@@ -1916,7 +1916,7 @@ static BOOL create_port_device( DRIVER_OBJECT *driver, int n, const char *unix_p +@@ -1868,7 +1868,7 @@ static BOOL create_port_device( DRIVER_OBJECT *driver, int n, const char *unix_p UNICODE_STRING nt_name, symlink_name, default_name; DEVICE_OBJECT *dev_obj; NTSTATUS status; @@ -25,20 +25,20 @@ index 332f390550d..6343807e14d 100644 /* create DOS device */ if (MOUNTMGR_CALL( set_dosdev_symlink, ¶ms )) return FALSE; diff --git a/dlls/mountmgr.sys/unixlib.c b/dlls/mountmgr.sys/unixlib.c -index 52a3fce66d6..de1e0445a5c 100644 +index 73735c22d13..5f720c29bd5 100644 --- a/dlls/mountmgr.sys/unixlib.c +++ b/dlls/mountmgr.sys/unixlib.c -@@ -31,6 +31,9 @@ - #include - #include - #include +@@ -46,6 +46,9 @@ + #ifdef HAVE_SYS_MOUNT_H + #include + #endif +#ifdef HAVE_TERMIOS_H +# include +#endif #include "unixlib.h" -@@ -253,6 +256,27 @@ static NTSTATUS set_dosdev_symlink( void *args ) +@@ -268,6 +271,27 @@ static NTSTATUS set_dosdev_symlink( void *args ) char *path; NTSTATUS status = STATUS_SUCCESS; @@ -67,7 +67,7 @@ index 52a3fce66d6..de1e0445a5c 100644 if (params->dest && params->dest[0]) diff --git a/dlls/mountmgr.sys/unixlib.h b/dlls/mountmgr.sys/unixlib.h -index e7846a764da..72f60f200b8 100644 +index 188cf93b091..31f5e8a807e 100644 --- a/dlls/mountmgr.sys/unixlib.h +++ b/dlls/mountmgr.sys/unixlib.h @@ -75,6 +75,7 @@ struct set_dosdev_symlink_params diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 199ff73b..97536408 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -1852,9 +1852,10 @@ fi # | # | Modified files: # | * configure.ac, dlls/kernel32/path.c, dlls/kernel32/tests/path.c, dlls/kernelbase/file.c, dlls/mountmgr.sys/device.c, -# | dlls/msvcp120/tests/msvcp120.c, dlls/msvcp140/tests/msvcp140.c, dlls/ntdll/tests/file.c, dlls/ntdll/unix/file.c, -# | include/Makefile.in, include/ntifs.h, include/winnt.h, include/winternl.h, programs/cmd/builtins.c, -# | programs/cmd/directory.c, server/fd.c, server/file.c, server/protocol.def +# | dlls/mountmgr.sys/unixlib.c, dlls/mountmgr.sys/unixlib.h, dlls/msvcp120/tests/msvcp120.c, +# | dlls/msvcp140/tests/msvcp140.c, dlls/ntdll/tests/file.c, dlls/ntdll/unix/file.c, include/Makefile.in, include/ntifs.h, +# | include/winnt.h, include/winternl.h, programs/cmd/builtins.c, programs/cmd/directory.c, server/fd.c, server/file.c, +# | server/protocol.def # | if test "$enable_ntdll_Junction_Points" -eq 1; then patch_apply ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch