Rebase against 16c6c249a5134de2422fbd3471ead7425c968301.

This commit is contained in:
Zebediah Figura
2022-10-10 22:27:34 -05:00
parent 0ea57a0262
commit e6f9a449cd
13 changed files with 58 additions and 636 deletions

View File

@@ -1,4 +1,4 @@
From 6209b270e6f2a7913a95f6c1da18c11e2e2a73a5 Mon Sep 17 00:00:00 2001
From 98350beb9209a2fdb1caeaf9ca6cf508ab2b4d80 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 creating reparse points.
@@ -15,10 +15,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
create mode 100644 include/ntifs.h
diff --git a/configure.ac b/configure.ac
index 3ea4c2afe0a..d0ec1d837c3 100644
index 41a29cee398..167839c5793 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2030,6 +2030,8 @@ AC_CHECK_FUNCS(\
@@ -2025,6 +2025,8 @@ AC_CHECK_FUNCS(\
prctl \
proc_pidinfo \
sched_yield \
@@ -41,7 +41,7 @@ index 3b1cdb54f9f..6eb4690f8e0 100644
EXTRADLLFLAGS = -nodefaultlibs -Wl,--image-base,0x7bc00000
x86_64_EXTRADLLFLAGS = -nodefaultlibs -Wl,--image-base,0x170000000
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 4b142f241e5..5f6cb223951 100644
index ddc864b3588..2baacaa9bc3 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -38,6 +38,7 @@
@@ -217,19 +217,19 @@ index 4b142f241e5..5f6cb223951 100644
test_mailslot_name();
}
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index d103e3195b5..3fb4ded846c 100644
index 604ca866890..58310fd8504 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -35,6 +35,8 @@
#include <string.h>
@@ -36,6 +36,8 @@
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
+#include <math.h>
+#include <libgen.h>
#include <limits.h>
#include <unistd.h>
#ifdef HAVE_MNTENT_H
@@ -127,6 +129,7 @@
@@ -121,6 +123,7 @@
#include "wine/list.h"
#include "wine/debug.h"
#include "unix_private.h"
@@ -237,7 +237,7 @@ index d103e3195b5..3fb4ded846c 100644
WINE_DEFAULT_DEBUG_CHANNEL(file);
WINE_DECLARE_DEBUG_CHANNEL(winediag);
@@ -138,6 +141,12 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
@@ -132,6 +135,12 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
#undef EXT2_IOC_GETFLAGS
#undef EXT4_CASEFOLD_FL
@@ -250,7 +250,7 @@ index d103e3195b5..3fb4ded846c 100644
#ifdef linux
/* We want the real kernel dirent structure, not the libc one */
@@ -239,6 +248,95 @@ static const BOOL is_case_sensitive = FALSE;
@@ -236,6 +245,95 @@ static const BOOL is_case_sensitive = FALSE;
static pthread_mutex_t dir_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t mnt_mutex = PTHREAD_MUTEX_INITIALIZER;
@@ -346,7 +346,7 @@ index d103e3195b5..3fb4ded846c 100644
/* check if a given Unicode char is OK in a DOS short name */
static inline BOOL is_invalid_dos_char( WCHAR ch )
{
@@ -1574,6 +1672,28 @@ static inline ULONG get_file_attributes( const struct stat *st )
@@ -1540,6 +1638,28 @@ static int parse_samba_dos_attrib_data( char *data, int len )
}
@@ -375,7 +375,7 @@ index d103e3195b5..3fb4ded846c 100644
static BOOL fd_is_mount_point( int fd, const struct stat *st )
{
struct stat parent;
@@ -3313,6 +3433,179 @@ done:
@@ -3303,6 +3423,179 @@ done:
}
@@ -555,7 +555,7 @@ index d103e3195b5..3fb4ded846c 100644
/******************************************************************************
* lookup_unix_name
*
@@ -6060,6 +6353,13 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
@@ -6052,6 +6345,13 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
break;
}
@@ -570,7 +570,7 @@ index d103e3195b5..3fb4ded846c 100644
TRACE("FSCTL_SET_SPARSE: Ignoring request\n");
io->Information = 0;
diff --git a/include/Makefile.in b/include/Makefile.in
index 70134a7bcb7..bdddf5426fe 100644
index 1c04f9a298b..7a2c9f96c1b 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -563,6 +563,7 @@ SOURCES = \

View File

@@ -1,4 +1,4 @@
From f93a10fd26b694aa0df49f032844f9ddd34c632d Mon Sep 17 00:00:00 2001
From e64115c5421f37bbc426455d338d16ccb60ac9b2 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 16 Jan 2014 21:01:25 -0700
Subject: [PATCH] ntdll: Add support for testing for reparse points with
@@ -7,11 +7,11 @@ Subject: [PATCH] ntdll: Add support for testing for reparse points with
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
---
dlls/ntdll/tests/file.c | 5 +++++
dlls/ntdll/unix/file.c | 25 ++++++++++++++++++++-----
2 files changed, 25 insertions(+), 5 deletions(-)
dlls/ntdll/unix/file.c | 26 +++++++++++++++++++++-----
2 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 54f7c7fc860..7fa50ec59a6 100644
index 2641197130b..4a18bd5c01a 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -5469,6 +5469,11 @@ static void test_reparse_points(void)
@@ -27,10 +27,10 @@ index 54f7c7fc860..7fa50ec59a6 100644
HeapFree(GetProcessHeap(), 0, buffer);
buffer_len = sizeof(*buffer) + 2*32767;
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index af390214624..201eeab7013 100644
index 0b2987bf140..92dcd7775d6 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -1788,10 +1788,20 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON
@@ -1755,11 +1755,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;
@@ -38,6 +38,7 @@ index af390214624..201eeab7013 100644
/* consider mount points to be reparse points (IO_REPARSE_TAG_MOUNT_POINT) */
if ((options & FILE_OPEN_REPARSE_POINT) && fd_is_mount_point( fd, st ))
*attr |= FILE_ATTRIBUTE_REPARSE_POINT;
+ if (S_ISLNK( st->st_mode ))
+ {
+ BOOL is_dir;
@@ -49,10 +50,11 @@ index af390214624..201eeab7013 100644
+ st->st_mode = (st->st_mode & ~S_IFMT) | (is_dir ? S_IFDIR : S_IFREG);
+ }
+ *attr |= get_file_attributes( st );
return ret;
}
@@ -1841,10 +1851,15 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
+
attr_len = xattr_fget( fd, SAMBA_XATTR_DOS_ATTRIB, attr_data, sizeof(attr_data)-1 );
if (attr_len != -1)
*attr |= parse_samba_dos_attrib_data( attr_data, attr_len );
@@ -1828,10 +1839,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 ))
{

View File

@@ -1,5 +1,4 @@
Fixes: [12401] NET Framework 2.0, 3.0, 4.0 installers and other apps that make use of GAC API for managed assembly installation on NTFS filesystems need reparse point/junction API support (FSCTL_SET_REPARSE_POINT/FSCTL_GET_REPARSE_POINT)
Fixes: [44948] Multiple apps (Spine (Mod starter for Gothic), MS Office 365 installer) need CreateSymbolicLinkW implementation
Depends: ntdll-DOS_Attributes
Depends: ntdll-NtQueryEaFile
Depends: ntdll-Serial_Port_Detection