Rebase against 3660176e09bc02e71586b4cf42f58c9498481af6.

This commit is contained in:
Alistair Leslie-Hughes
2021-10-07 09:15:30 +11:00
parent 7750a01cea
commit c61d12592b
24 changed files with 365 additions and 428 deletions

View File

@@ -1,4 +1,4 @@
From 0d7dd662276c859955251d2cbeef0d60195d6574 Mon Sep 17 00:00:00 2001
From eb4503d43fbe4282eb8bf3036bc0a7a0f299691c Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 16 Jan 2014 20:56:49 -0700
Subject: [PATCH] ntdll: Add support for junction point creation.
@@ -14,13 +14,13 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
create mode 100644 include/ntifs.h
diff --git a/configure.ac b/configure.ac
index 855f0848eec..41ab0c1d8e4 100644
index ecc9f1c8af5..2b68bdde1d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2215,6 +2215,8 @@ AC_CHECK_FUNCS(\
@@ -2175,6 +2175,8 @@ AC_CHECK_FUNCS(\
posix_fallocate \
prctl \
proc_pidinfo \
readlink \
+ renameat \
+ renameat2 \
sched_yield \
@@ -152,7 +152,7 @@ index 46037546e6e..7a01e947e13 100644
test_mailslot_name();
}
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 38c03d114ed..683bd67385d 100644
index 98fcc075c45..6ffa1473199 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -36,6 +36,7 @@
@@ -215,7 +215,7 @@ index 38c03d114ed..683bd67385d 100644
/* get space from the current directory data buffer, allocating a new one if necessary */
static void *get_dir_data_space( struct dir_data *data, unsigned int size )
{
@@ -5922,6 +5954,116 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer,
@@ -5936,6 +5968,116 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer,
}
@@ -332,7 +332,7 @@ index 38c03d114ed..683bd67385d 100644
/******************************************************************************
* NtFsControlFile (NTDLL.@)
*/
@@ -6004,6 +6146,23 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
@@ -6018,6 +6160,23 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
break;
}
@@ -357,10 +357,10 @@ index 38c03d114ed..683bd67385d 100644
TRACE("FSCTL_SET_SPARSE: Ignoring request\n");
io->Information = 0;
diff --git a/include/Makefile.in b/include/Makefile.in
index 43a4fd98a42..99cab5a18f6 100644
index eac1c2e0570..25b00f9e52b 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -545,6 +545,7 @@ SOURCES = \
@@ -546,6 +546,7 @@ SOURCES = \
ntdef.h \
ntdsapi.h \
ntgdi.h \

View File

@@ -1,4 +1,4 @@
From 9d760a7c86cff579f870d78d0d5b4a6624b22324 Mon Sep 17 00:00:00 2001
From c0f79c570c9b54d7ea42af6c9e8a2e25b83a6c01 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Sun, 22 Nov 2020 22:37:33 -0700
Subject: [PATCH] ntdll: Allow set_file_times_precise to work on reparse
@@ -11,11 +11,11 @@ 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 4b7d72063d8..0a15b7b92ff 100644
index 2b68bdde1d2..bf9e8103606 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2224,7 +2224,8 @@ AC_CHECK_FUNCS(\
symlink \
@@ -2183,7 +2183,8 @@ AC_CHECK_FUNCS(\
sigprocmask \
sysinfo \
tcdrain \
- thr_kill2
@@ -65,7 +65,7 @@ index 490d5160761..2449ee54799 100644
CloseHandle(handle);
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 2ee9288f500..2f0ec520288 100644
index efde4dd41f1..d60a3c44b00 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 )
@@ -98,20 +98,20 @@ index 2ee9288f500..2f0ec520288 100644
#ifdef __APPLE__
- if (!&futimens) return FALSE;
+ if (!&utimensat || !&futimens) return FALSE;
#endif
- if (futimens( fd, tv ) == -1) *status = errno_to_status( errno );
- else *status = STATUS_SUCCESS;
+#endif
+#if defined(HAVE_UTIMENSAT)
+ /* futimens does not work on O_PATH|O_NOFOLLOW (O_SYMLINK) file descriptors, so if fd is for a
+ * symlink then use utimensat with an empty path (.) and do not follow the link. */
+ if (utimensat(fd, ".", tv, AT_SYMLINK_NOFOLLOW) == 0) *status = STATUS_SUCCESS;
+ else
+#endif
#endif
- if (futimens( fd, tv ) == -1) *status = errno_to_status( errno );
- else *status = STATUS_SUCCESS;
+ if (futimens(fd, tv) == 0) *status = STATUS_SUCCESS;
+ else *status = errno_to_status( errno );
return TRUE;
#else
return FALSE;
--
2.30.2
2.33.0