mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against 536aec511612afd002808508d76bd5640f359f25.
This commit is contained in:
parent
914f67c020
commit
1a87edb76b
@ -1,4 +1,4 @@
|
||||
From 8acdf6bd71522ed36ccc9406b27f9ddb4866752a Mon Sep 17 00:00:00 2001
|
||||
From 8d80506ade85cac639a732280111226f65e0aac3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 4 Aug 2017 02:33:14 +0200
|
||||
Subject: [PATCH] ntdll: Implement NtFilterToken.
|
||||
@ -16,7 +16,7 @@ Subject: [PATCH] ntdll: Implement NtFilterToken.
|
||||
9 files changed, 163 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
|
||||
index f23f18ed494..eeaf3e41b92 100644
|
||||
index cc13672b2b9..443d46c71c7 100644
|
||||
--- a/dlls/ntdll/nt.c
|
||||
+++ b/dlls/ntdll/nt.c
|
||||
@@ -90,6 +90,65 @@ NTSTATUS WINAPI NtDuplicateToken(
|
||||
@ -86,23 +86,23 @@ index f23f18ed494..eeaf3e41b92 100644
|
||||
* NtOpenProcessToken [NTDLL.@]
|
||||
* ZwOpenProcessToken [NTDLL.@]
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index 4c8a1f6165a..42ce9815489 100644
|
||||
index 6293dc81ed4..36f7ddbda81 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -208,7 +208,7 @@
|
||||
# @ stub NtEnumerateSystemEnvironmentValuesEx
|
||||
@ stdcall NtEnumerateValueKey(long long long ptr long ptr)
|
||||
@ stdcall -syscall NtEnumerateValueKey(long long long ptr long ptr)
|
||||
@ stub NtExtendSection
|
||||
-# @ stub NtFilterToken
|
||||
+@ stdcall NtFilterToken(long long ptr ptr ptr ptr)
|
||||
@ stdcall NtFindAtom(ptr long ptr)
|
||||
@ stdcall -syscall NtFindAtom(ptr long ptr)
|
||||
@ stdcall -syscall NtFlushBuffersFile(long ptr)
|
||||
@ stdcall -syscall NtFlushInstructionCache(long ptr long)
|
||||
diff --git a/include/winnt.h b/include/winnt.h
|
||||
index 798a1dd248c..312c78ca7b5 100644
|
||||
index e1cf78420a6..da17fe3e330 100644
|
||||
--- a/include/winnt.h
|
||||
+++ b/include/winnt.h
|
||||
@@ -4227,6 +4227,11 @@ typedef enum _TOKEN_INFORMATION_CLASS {
|
||||
@@ -4221,6 +4221,11 @@ typedef enum _TOKEN_INFORMATION_CLASS {
|
||||
TOKEN_ADJUST_SESSIONID | \
|
||||
TOKEN_ADJUST_DEFAULT )
|
||||
|
||||
@ -153,10 +153,10 @@ index 5e587b28cbe..406167e825b 100644
|
||||
}
|
||||
if (!process->handles || !process->token) goto error;
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 4a59c327287..93a16c68f33 100644
|
||||
index a121c371c19..ee07b1eca14 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3265,6 +3265,16 @@ enum caret_state
|
||||
@@ -3263,6 +3263,16 @@ enum caret_state
|
||||
obj_handle_t new_handle; /* duplicated handle */
|
||||
@END
|
||||
|
||||
|
@ -1,53 +1,19 @@
|
||||
From 157385f6bdf23c65b1375126f73dad87fcb503f4 Mon Sep 17 00:00:00 2001
|
||||
From a010b05e656e6abc4c0b36f1e75902dbecb5dfdc Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 6 Jun 2015 07:03:33 +0800
|
||||
Subject: [PATCH] ntdll: Improve stub of NtQueryEaFile.
|
||||
|
||||
Based on a patch by Qian Hong.
|
||||
---
|
||||
dlls/ntdll/file.c | 19 ++++++++--
|
||||
dlls/ntdll/tests/file.c | 83 +++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 98 insertions(+), 4 deletions(-)
|
||||
dlls/ntdll/unix/file.c | 15 +++++++-
|
||||
2 files changed, 96 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index 7a49cb5d8db..b940201c5a8 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -4041,14 +4041,25 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io
|
||||
* Success: 0. Attributes read into buffer
|
||||
* Failure: An NTSTATUS error code describing the error.
|
||||
*/
|
||||
-NTSTATUS WINAPI NtQueryEaFile( HANDLE hFile, PIO_STATUS_BLOCK iosb, PVOID buffer, ULONG length,
|
||||
+NTSTATUS WINAPI NtQueryEaFile( HANDLE handle, PIO_STATUS_BLOCK iosb, PVOID buffer, ULONG length,
|
||||
BOOLEAN single_entry, PVOID ea_list, ULONG ea_list_len,
|
||||
PULONG ea_index, BOOLEAN restart )
|
||||
{
|
||||
- FIXME("(%p,%p,%p,%d,%d,%p,%d,%p,%d) stub\n",
|
||||
- hFile, iosb, buffer, length, single_entry, ea_list,
|
||||
+ int fd, needs_close;
|
||||
+ NTSTATUS status;
|
||||
+
|
||||
+ FIXME("(%p,%p,%p,%d,%d,%p,%d,%p,%d) semi-stub\n",
|
||||
+ handle, iosb, buffer, length, single_entry, ea_list,
|
||||
ea_list_len, ea_index, restart);
|
||||
- return STATUS_ACCESS_DENIED;
|
||||
+
|
||||
+ if ((status = unix_funcs->server_get_unix_fd( handle, 0, &fd, &needs_close, NULL, NULL )) != STATUS_SUCCESS)
|
||||
+ return status;
|
||||
+
|
||||
+ if (buffer && length)
|
||||
+ memset( buffer, 0, length );
|
||||
+
|
||||
+ if (needs_close) close( fd );
|
||||
+ return STATUS_NO_EAS_ON_FILE;
|
||||
}
|
||||
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 44335514761..abd5903e804 100644
|
||||
index 6164b0c4bde..802d7ca71aa 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -85,6 +85,7 @@ static NTSTATUS (WINAPI *pNtQueryDirectoryFile)(HANDLE,HANDLE,PIO_APC_ROUTINE,PV
|
||||
@@ -84,6 +84,7 @@ static NTSTATUS (WINAPI *pNtQueryDirectoryFile)(HANDLE,HANDLE,PIO_APC_ROUTINE,PV
|
||||
static NTSTATUS (WINAPI *pNtQueryVolumeInformationFile)(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
|
||||
static NTSTATUS (WINAPI *pNtQueryFullAttributesFile)(const OBJECT_ATTRIBUTES*, FILE_NETWORK_OPEN_INFORMATION*);
|
||||
static NTSTATUS (WINAPI *pNtFlushBuffersFile)(HANDLE, IO_STATUS_BLOCK*);
|
||||
@ -55,7 +21,7 @@ index 44335514761..abd5903e804 100644
|
||||
|
||||
static WCHAR fooW[] = {'f','o','o',0};
|
||||
|
||||
@@ -4886,6 +4887,86 @@ static void test_flush_buffers_file(void)
|
||||
@@ -4904,6 +4905,86 @@ static void test_flush_buffers_file(void)
|
||||
DeleteFileA(buffer);
|
||||
}
|
||||
|
||||
@ -142,7 +108,7 @@ index 44335514761..abd5903e804 100644
|
||||
static void test_file_readonly_access(void)
|
||||
{
|
||||
static const DWORD default_sharing = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;
|
||||
@@ -5375,6 +5456,7 @@ START_TEST(file)
|
||||
@@ -5012,6 +5093,7 @@ START_TEST(file)
|
||||
pNtQueryVolumeInformationFile = (void *)GetProcAddress(hntdll, "NtQueryVolumeInformationFile");
|
||||
pNtQueryFullAttributesFile = (void *)GetProcAddress(hntdll, "NtQueryFullAttributesFile");
|
||||
pNtFlushBuffersFile = (void *)GetProcAddress(hntdll, "NtFlushBuffersFile");
|
||||
@ -150,14 +116,40 @@ index 44335514761..abd5903e804 100644
|
||||
|
||||
test_read_write();
|
||||
test_NtCreateFile();
|
||||
@@ -5404,6 +5486,7 @@ START_TEST(file)
|
||||
@@ -5041,5 +5123,6 @@ START_TEST(file)
|
||||
test_query_volume_information_file();
|
||||
test_query_attribute_information_file();
|
||||
test_ioctl();
|
||||
+ test_query_ea();
|
||||
test_flush_buffers_file();
|
||||
test_reparse_points();
|
||||
}
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 20eb6a05922..75e78a0d004 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -6440,9 +6440,20 @@ NTSTATUS WINAPI NtQueryEaFile( HANDLE handle, IO_STATUS_BLOCK *io, void *buffer,
|
||||
BOOLEAN single_entry, void *list, ULONG list_len,
|
||||
ULONG *index, BOOLEAN restart )
|
||||
{
|
||||
- FIXME( "(%p,%p,%p,%d,%d,%p,%d,%p,%d) stub\n",
|
||||
+ int fd, needs_close;
|
||||
+ NTSTATUS status;
|
||||
+
|
||||
+ FIXME( "(%p,%p,%p,%d,%d,%p,%d,%p,%d) semi-stub\n",
|
||||
handle, io, buffer, length, single_entry, list, list_len, index, restart );
|
||||
- return STATUS_ACCESS_DENIED;
|
||||
+
|
||||
+ if ((status = server_get_unix_fd( handle, 0, &fd, &needs_close, NULL, NULL )))
|
||||
+ return status;
|
||||
+
|
||||
+ if (buffer && length)
|
||||
+ memset( buffer, 0, length );
|
||||
+
|
||||
+ if (needs_close) close( fd );
|
||||
+ return STATUS_NO_EAS_ON_FILE;
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.26.2
|
||||
2.27.0
|
||||
|
||||
|
@ -1,5 +1 @@
|
||||
Fixes: Improve stub for NtQueryEaFile
|
||||
# Depends: ntdll-Syscall_Wrappers
|
||||
Depends: ntdll-Junction_Points
|
||||
# Temporarily disabled until it's moved to unixlib.
|
||||
Disabled: true
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "9415667cdfbb4c94cdfe03a1e80a87482bee98c1"
|
||||
echo "536aec511612afd002808508d76bd5640f359f25"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -179,6 +179,7 @@ patch_enable_all ()
|
||||
enable_ntdll_Manifest_Range="$1"
|
||||
enable_ntdll_NtAccessCheck="$1"
|
||||
enable_ntdll_NtDevicePath="$1"
|
||||
enable_ntdll_NtQueryEaFile="$1"
|
||||
enable_ntdll_NtQuerySection="$1"
|
||||
enable_ntdll_NtQueryVirtualMemory="$1"
|
||||
enable_ntdll_NtSetLdtEntries="$1"
|
||||
@ -626,6 +627,9 @@ patch_enable ()
|
||||
ntdll-NtDevicePath)
|
||||
enable_ntdll_NtDevicePath="$2"
|
||||
;;
|
||||
ntdll-NtQueryEaFile)
|
||||
enable_ntdll_NtQueryEaFile="$2"
|
||||
;;
|
||||
ntdll-NtQuerySection)
|
||||
enable_ntdll_NtQuerySection="$2"
|
||||
;;
|
||||
@ -3687,6 +3691,18 @@ if test "$enable_ntdll_NtDevicePath" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-NtQueryEaFile
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ntdll/tests/file.c, dlls/ntdll/unix/file.c
|
||||
# |
|
||||
if test "$enable_ntdll_NtQueryEaFile" -eq 1; then
|
||||
patch_apply ntdll-NtQueryEaFile/0001-ntdll-Improve-stub-of-NtQueryEaFile.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Improve stub of NtQueryEaFile.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-NtQuerySection
|
||||
# |
|
||||
# | Modified files:
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d4791a079ee17b42ca668778f18335df471eba6b Mon Sep 17 00:00:00 2001
|
||||
From 959b3618856923c384de07bc44124ba0fa3a3a64 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Wed, 8 Mar 2017 02:12:37 +0100
|
||||
Subject: [PATCH] ntdll: Implement ObjectTypesInformation in NtQueryObject.
|
||||
@ -12,10 +12,10 @@ Subject: [PATCH] ntdll: Implement ObjectTypesInformation in NtQueryObject.
|
||||
5 files changed, 165 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c
|
||||
index c17b6ffa8db..6e760066915 100644
|
||||
index f68827c7180..b71e81ef364 100644
|
||||
--- a/dlls/ntdll/tests/om.c
|
||||
+++ b/dlls/ntdll/tests/om.c
|
||||
@@ -81,6 +81,21 @@ static void (WINAPI *pRtlWakeAddressSingle)( const void * );
|
||||
@@ -78,6 +78,21 @@ static void (WINAPI *pRtlWakeAddressSingle)( const void * );
|
||||
#define KEYEDEVENT_WAKE 0x0002
|
||||
#define KEYEDEVENT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x0003)
|
||||
|
||||
@ -36,8 +36,8 @@ index c17b6ffa8db..6e760066915 100644
|
||||
+
|
||||
static void test_case_sensitive (void)
|
||||
{
|
||||
static const WCHAR buffer1[] = {'\\','B','a','s','e','N','a','m','e','d','O','b','j','e','c','t','s','\\','t','e','s','t',0};
|
||||
@@ -1583,6 +1598,47 @@ static void test_query_object(void)
|
||||
NTSTATUS status;
|
||||
@@ -1466,6 +1481,47 @@ static void test_query_object(void)
|
||||
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ index c17b6ffa8db..6e760066915 100644
|
||||
static void test_type_mismatch(void)
|
||||
{
|
||||
HANDLE h;
|
||||
@@ -2215,6 +2271,7 @@ START_TEST(om)
|
||||
@@ -2063,6 +2119,7 @@ START_TEST(om)
|
||||
test_directory();
|
||||
test_symboliclink();
|
||||
test_query_object();
|
||||
@ -94,7 +94,7 @@ index c17b6ffa8db..6e760066915 100644
|
||||
test_event();
|
||||
test_mutant();
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 976dfb4fcc5..693f6290f9b 100644
|
||||
index 20eb6a05922..bb9bee0340b 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -130,6 +130,8 @@
|
||||
@ -106,7 +106,7 @@ index 976dfb4fcc5..693f6290f9b 100644
|
||||
#define MAX_DOS_DRIVES 26
|
||||
|
||||
#define FILE_WRITE_TO_END_OF_FILE ((LONGLONG)-1)
|
||||
@@ -6678,6 +6680,57 @@ NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_clas
|
||||
@@ -6595,6 +6597,57 @@ NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_clas
|
||||
break;
|
||||
}
|
||||
|
||||
@ -165,10 +165,10 @@ index 976dfb4fcc5..693f6290f9b 100644
|
||||
{
|
||||
OBJECT_DATA_INFORMATION* p = ptr;
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index 1182d1ff429..5dc7a9974b6 100644
|
||||
index 1266f55c6b1..9ec91f743f9 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -844,7 +844,7 @@ typedef enum _OBJECT_INFORMATION_CLASS {
|
||||
@@ -843,7 +843,7 @@ typedef enum _OBJECT_INFORMATION_CLASS {
|
||||
ObjectBasicInformation,
|
||||
ObjectNameInformation,
|
||||
ObjectTypeInformation,
|
||||
@ -177,7 +177,7 @@ index 1182d1ff429..5dc7a9974b6 100644
|
||||
ObjectDataInformation
|
||||
} OBJECT_INFORMATION_CLASS, *POBJECT_INFORMATION_CLASS;
|
||||
|
||||
@@ -1304,9 +1304,35 @@ typedef struct _OBJECT_NAME_INFORMATION {
|
||||
@@ -1281,9 +1281,35 @@ typedef struct _OBJECT_NAME_INFORMATION {
|
||||
|
||||
typedef struct __OBJECT_TYPE_INFORMATION {
|
||||
UNICODE_STRING TypeName;
|
||||
@ -215,10 +215,10 @@ index 1182d1ff429..5dc7a9974b6 100644
|
||||
#ifdef __WINESRC__
|
||||
DWORD_PTR ExitStatus;
|
||||
diff --git a/server/directory.c b/server/directory.c
|
||||
index b735602a805..d89da8b169b 100644
|
||||
index 198fc48ece2..ab0498e952f 100644
|
||||
--- a/server/directory.c
|
||||
+++ b/server/directory.c
|
||||
@@ -73,6 +73,8 @@ static const struct object_ops object_type_ops =
|
||||
@@ -72,6 +72,8 @@ static const struct object_ops object_type_ops =
|
||||
no_destroy /* destroy */
|
||||
};
|
||||
|
||||
@ -227,7 +227,7 @@ index b735602a805..d89da8b169b 100644
|
||||
|
||||
struct directory
|
||||
{
|
||||
@@ -238,7 +240,8 @@ struct object_type *get_object_type( const struct unicode_str *name )
|
||||
@@ -236,7 +238,8 @@ struct object_type *get_object_type( const struct unicode_str *name )
|
||||
{
|
||||
if (get_error() != STATUS_OBJECT_NAME_EXISTS)
|
||||
{
|
||||
@ -237,7 +237,7 @@ index b735602a805..d89da8b169b 100644
|
||||
make_object_static( &type->obj );
|
||||
}
|
||||
clear_error();
|
||||
@@ -553,3 +556,17 @@ DECL_HANDLER(get_object_type)
|
||||
@@ -551,3 +554,17 @@ DECL_HANDLER(get_object_type)
|
||||
}
|
||||
release_object( obj );
|
||||
}
|
||||
@ -256,10 +256,10 @@ index b735602a805..d89da8b169b 100644
|
||||
+ else set_error( STATUS_NO_MORE_ENTRIES );
|
||||
+}
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 98289c685da..57ced5b1683 100644
|
||||
index a121c371c19..aa3be515ffe 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3472,6 +3472,15 @@ struct handle_info
|
||||
@@ -3440,6 +3440,15 @@ struct handle_info
|
||||
@END
|
||||
|
||||
|
||||
|
@ -1 +1 @@
|
||||
9415667cdfbb4c94cdfe03a1e80a87482bee98c1
|
||||
536aec511612afd002808508d76bd5640f359f25
|
||||
|
Loading…
Reference in New Issue
Block a user