Rebase against 67ef5151744b347d4a30c985da6712fb0061e675.

This commit is contained in:
Alistair Leslie-Hughes
2020-06-18 08:59:21 +10:00
parent 03f5adcafb
commit 02913f754f
6 changed files with 63 additions and 113 deletions

View File

@@ -1,4 +1,4 @@
From feb53ed39179603391eff600ea59edc41407b238 Mon Sep 17 00:00:00 2001
From cae4c8ad24a127367a3cf8bcc1333af72eea8cc9 Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Fri, 3 Jan 2020 17:39:08 +0300
Subject: [PATCH] ntdll: Call NtOpenFile through syscall thunk.
@@ -6,19 +6,18 @@ Subject: [PATCH] ntdll: Call NtOpenFile through syscall thunk.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48410
---
dlls/ntdll/actctx.c | 4 ++--
dlls/ntdll/directory.c | 2 +-
dlls/ntdll/loader.c | 2 +-
dlls/ntdll/locale.c | 4 ++--
dlls/ntdll/ntdll_misc.h | 8 ++++++++
dlls/ntdll/path.c | 2 +-
dlls/ntdll/process.c | 2 +-
7 files changed, 16 insertions(+), 8 deletions(-)
6 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
index a25cefa555ac..34ba0dc813c6 100644
index e1051745db3..fcc22774338 100644
--- a/dlls/ntdll/actctx.c
+++ b/dlls/ntdll/actctx.c
@@ -2894,7 +2894,7 @@ static NTSTATUS open_nt_file( HANDLE *handle, UNICODE_STRING *name )
@@ -2928,7 +2928,7 @@ static NTSTATUS open_nt_file( HANDLE *handle, UNICODE_STRING *name )
attr.ObjectName = name;
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
@@ -27,7 +26,7 @@ index a25cefa555ac..34ba0dc813c6 100644
}
static NTSTATUS get_manifest_in_module( struct actctx_loader* acl, struct assembly_identity* ai,
@@ -3211,7 +3211,7 @@ static NTSTATUS lookup_winsxs(struct actctx_loader* acl, struct assembly_identit
@@ -3245,7 +3245,7 @@ static NTSTATUS lookup_winsxs(struct actctx_loader* acl, struct assembly_identit
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
@@ -36,21 +35,8 @@ index a25cefa555ac..34ba0dc813c6 100644
FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT ))
{
sxs_ai = *ai;
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index 18428658a5b5..7a9de26ccb0c 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -3071,7 +3071,7 @@ NTSTATUS DIR_get_unix_cwd( char **cwd )
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
- status = NtOpenFile( &handle, SYNCHRONIZE, &attr, &io, 0,
+ status = __syscall_NtOpenFile( &handle, SYNCHRONIZE, &attr, &io, 0,
FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT );
RtlFreeUnicodeString( &dirW );
if (status != STATUS_SUCCESS) goto done;
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 51d989f30b45..8f1653b0d626 100644
index 316e5fa0b5b..675d767c5a1 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -2521,7 +2521,7 @@ static NTSTATUS open_dll_file( UNICODE_STRING *nt_name, WINE_MODREF **pwm,
@@ -63,10 +49,10 @@ index 51d989f30b45..8f1653b0d626 100644
FILE_SYNCHRONOUS_IO_NONALERT | FILE_NON_DIRECTORY_FILE )))
{
diff --git a/dlls/ntdll/locale.c b/dlls/ntdll/locale.c
index 15ccdeb2e637..928edcb04e2c 100644
index d6bde700e42..16a7f911173 100644
--- a/dlls/ntdll/locale.c
+++ b/dlls/ntdll/locale.c
@@ -660,7 +660,7 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE *file )
@@ -654,7 +654,7 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE *file )
return STATUS_NO_MEMORY;
valueW.Length = NTDLL_swprintf( valueW.Buffer, pathfmtW, dir, name ) * sizeof(WCHAR);
InitializeObjectAttributes( &attr, &valueW, 0, 0, NULL );
@@ -75,7 +61,7 @@ index 15ccdeb2e637..928edcb04e2c 100644
if (!status) TRACE( "found %s\n", debugstr_w( valueW.Buffer ));
RtlFreeUnicodeString( &valueW );
if (status != STATUS_OBJECT_NAME_NOT_FOUND && status != STATUS_OBJECT_PATH_NOT_FOUND) return status;
@@ -684,7 +684,7 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE *file )
@@ -678,7 +678,7 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE *file )
wcscat( valueW.Buffer, name );
valueW.Length = wcslen(valueW.Buffer) * sizeof(WCHAR);
InitializeObjectAttributes( &attr, &valueW, 0, 0, NULL );
@@ -85,10 +71,10 @@ index 15ccdeb2e637..928edcb04e2c 100644
}
RtlFreeUnicodeString( &valueW );
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 9091d1ae8c77..f8e81ae49eaf 100644
index af30044ad1f..d7076c7a2b8 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -329,4 +329,12 @@ static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
@@ -282,4 +282,12 @@ static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
while (len--) *dst++ = (unsigned char)*src++;
}
@@ -102,10 +88,10 @@ index 9091d1ae8c77..f8e81ae49eaf 100644
+
#endif
diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c
index 32e1f951af5c..71ae44dd4988 100644
index 5f4eb11316f..d2112d1af0d 100644
--- a/dlls/ntdll/path.c
+++ b/dlls/ntdll/path.c
@@ -1020,7 +1020,7 @@ NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING* dir)
@@ -929,7 +929,7 @@ NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING* dir)
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
@@ -115,10 +101,10 @@ index 32e1f951af5c..71ae44dd4988 100644
if (nts != STATUS_SUCCESS) goto out;
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 884141da060c..32a1f5107f06 100644
index 533fe963cae..fd0e86ce147 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -1357,7 +1357,7 @@ static NTSTATUS get_pe_file_info( UNICODE_STRING *path, ULONG attributes,
@@ -396,7 +396,7 @@ static NTSTATUS get_pe_file_info( UNICODE_STRING *path, ULONG attributes,
memset( info, 0, sizeof(*info) );
InitializeObjectAttributes( &attr, path, attributes, 0, 0 );
@@ -128,5 +114,5 @@ index 884141da060c..32a1f5107f06 100644
{
BOOL is_64bit;
--
2.26.2
2.27.0