Rebase against 9415667cdfbb4c94cdfe03a1e80a87482bee98c1.

This commit is contained in:
Alistair Leslie-Hughes 2020-07-17 11:26:22 +10:00
parent c3c5d48b18
commit 914f67c020
7 changed files with 63 additions and 63 deletions

View File

@ -1,4 +1,4 @@
From 5a8cf4ee45f472a7b455aba19fa0c2a0b0b87473 Mon Sep 17 00:00:00 2001
From 8acdf6bd71522ed36ccc9406b27f9ddb4866752a 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 2d2d9a7e3d8..ce6904dbcfb 100644
index f23f18ed494..eeaf3e41b92 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -90,6 +90,65 @@ NTSTATUS WINAPI NtDuplicateToken(
@ -86,7 +86,7 @@ index 2d2d9a7e3d8..ce6904dbcfb 100644
* NtOpenProcessToken [NTDLL.@]
* ZwOpenProcessToken [NTDLL.@]
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index bd41da37af4..c65902a2adf 100644
index 4c8a1f6165a..42ce9815489 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -208,7 +208,7 @@
@ -96,13 +96,13 @@ index bd41da37af4..c65902a2adf 100644
-# @ stub NtFilterToken
+@ stdcall NtFilterToken(long long ptr ptr ptr ptr)
@ stdcall NtFindAtom(ptr long ptr)
@ stdcall NtFlushBuffersFile(long ptr)
@ stdcall NtFlushInstructionCache(long ptr long)
@ stdcall -syscall NtFlushBuffersFile(long ptr)
@ stdcall -syscall NtFlushInstructionCache(long ptr long)
diff --git a/include/winnt.h b/include/winnt.h
index e1cf78420a6..da17fe3e330 100644
index 798a1dd248c..312c78ca7b5 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -4221,6 +4221,11 @@ typedef enum _TOKEN_INFORMATION_CLASS {
@@ -4227,6 +4227,11 @@ typedef enum _TOKEN_INFORMATION_CLASS {
TOKEN_ADJUST_SESSIONID | \
TOKEN_ADJUST_DEFAULT )
@ -115,7 +115,7 @@ index e1cf78420a6..da17fe3e330 100644
#define _SECURITY_DEFINED
diff --git a/include/winternl.h b/include/winternl.h
index 10d109fede1..d2cf7d89ab5 100644
index b3fbb90feff..4687a410ca4 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2749,6 +2749,7 @@ NTSYSAPI NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES
@ -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 19dd9afb24d..43e0862433a 100644
index 4a59c327287..93a16c68f33 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3293,6 +3293,16 @@ enum caret_state
@@ -3265,6 +3265,16 @@ enum caret_state
obj_handle_t new_handle; /* duplicated handle */
@END

View File

@ -1,4 +1,4 @@
From 2588eb4eb5fe56aca7d229ea42b0eaa3786ff600 Mon Sep 17 00:00:00 2001
From 182f23825cd873fc2b4ee2ddb81b21d7194e60d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 5 Aug 2017 01:45:29 +0200
Subject: [PATCH] ntdll: Add function to create new tokens for elevation
@ -14,10 +14,10 @@ Subject: [PATCH] ntdll: Add function to create new tokens for elevation
6 files changed, 117 insertions(+)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index e5db07f0a4e..d52f6b76aa4 100644
index 42ce9815489..401bdd61d21 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1594,6 +1594,9 @@
@@ -1598,6 +1598,9 @@
# Virtual memory
@ cdecl __wine_locked_recvmsg(long ptr long)
@ -28,7 +28,7 @@ index e5db07f0a4e..d52f6b76aa4 100644
@ cdecl wine_get_version()
@ cdecl wine_get_build_id()
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 92fcde95a8a..80be882e76d 100644
index c8fbc1ae09d..2603b57be38 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -69,6 +69,9 @@ extern void init_locale( HMODULE module ) DECLSPEC_HIDDEN;
@ -42,10 +42,10 @@ index 92fcde95a8a..80be882e76d 100644
extern BOOL is_wow64 DECLSPEC_HIDDEN;
extern NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 992721d133f..24cb8f53de2 100644
index 77ba5b371e2..3e91a1fa9c4 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -82,6 +82,24 @@ HANDLE CDECL __wine_make_process_system(void)
@@ -72,6 +72,24 @@ HANDLE CDECL __wine_make_process_system(void)
return ret;
}
@ -67,14 +67,14 @@ index 992721d133f..24cb8f53de2 100644
+ return ret;
+}
+
/******************************************************************************
* NtQueryInformationProcess [NTDLL.@]
* ZwQueryInformationProcess [NTDLL.@]
/***********************************************************************
* restart_process
*/
diff --git a/server/protocol.def b/server/protocol.def
index 96bc9250ab0..14b811684d8 100644
index 9da597e2773..abfc744c960 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3759,6 +3759,14 @@ struct handle_info
@@ -3583,6 +3583,14 @@ struct handle_info
@END

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "42cb7d2ad1caba08de235e6319b9967296b5d554"
echo "9415667cdfbb4c94cdfe03a1e80a87482bee98c1"
}
# Show version information

View File

@ -1,4 +1,4 @@
From 057f64581fd7acc3834bae2c6ebccd812f26b722 Mon Sep 17 00:00:00 2001
From f8ff8733e9ea1e6862af0ce59b211153f83c5a93 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 4 Dec 2015 10:36:47 +0100
Subject: [PATCH] server: Introduce a new alloc_handle object callback. (v2)
@ -109,7 +109,7 @@ index db04727b93b..e72a155eeeb 100644
completion_destroy /* destroy */
};
diff --git a/server/console.c b/server/console.c
index d6673dca1bd..8ed0c1f2d81 100644
index 2785669deb2..4dc1eab78d7 100644
--- a/server/console.c
+++ b/server/console.c
@@ -99,6 +99,7 @@ static const struct object_ops console_input_ops =
@ -120,15 +120,15 @@ index d6673dca1bd..8ed0c1f2d81 100644
no_close_handle, /* close_handle */
console_input_destroy /* destroy */
};
@@ -134,6 +135,7 @@ static const struct object_ops console_input_events_ops =
@@ -156,6 +157,7 @@ static const struct object_ops console_input_events_ops =
NULL, /* unlink_name */
no_open_file, /* open_file */
console_input_events_open_file, /* open_file */
no_kernel_obj_list, /* get_kernel_obj_list */
+ no_alloc_handle, /* alloc_handle */
no_close_handle, /* close_handle */
console_input_events_destroy /* destroy */
};
@@ -197,6 +199,7 @@ static const struct object_ops screen_buffer_ops =
@@ -236,6 +238,7 @@ static const struct object_ops screen_buffer_ops =
NULL, /* unlink_name */
screen_buffer_open_file, /* open_file */
no_kernel_obj_list, /* get_kernel_obj_list */
@ -136,7 +136,7 @@ index d6673dca1bd..8ed0c1f2d81 100644
no_close_handle, /* close_handle */
screen_buffer_destroy /* destroy */
};
@@ -244,6 +247,7 @@ static const struct object_ops console_device_ops =
@@ -282,6 +285,7 @@ static const struct object_ops console_device_ops =
default_unlink_name, /* unlink_name */
console_device_open_file, /* open_file */
no_kernel_obj_list, /* get_kernel_obj_list */
@ -201,7 +201,7 @@ index 01e08f295f7..90150e1b251 100644
device_file_destroy /* destroy */
};
diff --git a/server/directory.c b/server/directory.c
index 4d38393a6c8..ce6f20723b0 100644
index 198fc48ece2..b735602a805 100644
--- a/server/directory.c
+++ b/server/directory.c
@@ -68,6 +68,7 @@ static const struct object_ops object_type_ops =
@ -241,7 +241,7 @@ index d339d85aa45..a78d73d9e78 100644
no_destroy /* destroy */
};
diff --git a/server/fd.c b/server/fd.c
index 7ea8ac273e5..a4741724fb6 100644
index fbfbe64a631..9e4ee358fe2 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -221,6 +221,7 @@ static const struct object_ops fd_ops =
@ -289,7 +289,7 @@ index 38260cfd2b3..ba9358c0ee0 100644
file_destroy /* destroy */
};
diff --git a/server/handle.c b/server/handle.c
index a2a8bb5479c..47378259df4 100644
index 9ae99cd0c63..5a3a357b991 100644
--- a/server/handle.c
+++ b/server/handle.c
@@ -134,6 +134,7 @@ static const struct object_ops handle_table_ops =
@ -374,7 +374,7 @@ index 781e6f3141a..6f0321393e2 100644
mailslot_device_destroy /* destroy */
};
diff --git a/server/mapping.c b/server/mapping.c
index 07c51c246d6..796855ac8e5 100644
index 6e74f5b770f..fc93e7cd7be 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -79,6 +79,7 @@ static const struct object_ops ranges_ops =
@ -414,7 +414,7 @@ index 8a8f7248eae..3754c35acbb 100644
mutex_destroy /* destroy */
};
diff --git a/server/named_pipe.c b/server/named_pipe.c
index f97b1416415..ef611f49918 100644
index 06bf8402aea..0be9953419f 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -129,6 +129,7 @@ static const struct object_ops named_pipe_ops =
@ -460,10 +460,10 @@ index f97b1416415..ef611f49918 100644
named_pipe_device_file_destroy /* destroy */
};
diff --git a/server/object.c b/server/object.c
index dacfe1d71a0..55321dddd87 100644
index 8ec6609f69d..c319cfc4876 100644
--- a/server/object.c
+++ b/server/object.c
@@ -694,6 +694,10 @@ struct object *no_open_file( struct object *obj, unsigned int access, unsigned i
@@ -711,6 +711,10 @@ struct object *no_open_file( struct object *obj, unsigned int access, unsigned i
return NULL;
}
@ -475,7 +475,7 @@ index dacfe1d71a0..55321dddd87 100644
{
return 1; /* ok to close */
diff --git a/server/object.h b/server/object.h
index f0b889d5899..13c59694c46 100644
index 1f5c4a5f061..d47abbc3e43 100644
--- a/server/object.h
+++ b/server/object.h
@@ -91,8 +91,10 @@ struct object_ops
@ -490,7 +490,7 @@ index f0b889d5899..13c59694c46 100644
/* destroy on refcount == 0 */
void (*destroy)(struct object *);
};
@@ -168,6 +170,7 @@ extern void default_unlink_name( struct object *obj, struct object_name *name );
@@ -170,6 +172,7 @@ extern void default_unlink_name( struct object *obj, struct object_name *name );
extern struct object *no_open_file( struct object *obj, unsigned int access, unsigned int sharing,
unsigned int options );
extern struct list *no_kernel_obj_list( struct object *obj );
@ -499,7 +499,7 @@ index f0b889d5899..13c59694c46 100644
extern void no_destroy( struct object *obj );
#ifdef DEBUG_OBJECTS
diff --git a/server/process.c b/server/process.c
index 9482da98be5..4166f1ce8df 100644
index 2c485831e33..f0d9a60bf87 100644
--- a/server/process.c
+++ b/server/process.c
@@ -89,6 +89,7 @@ static const struct object_ops process_ops =
@ -559,7 +559,7 @@ index dcbb3f791e1..6e5eddcd257 100644
key_destroy /* destroy */
};
diff --git a/server/request.c b/server/request.c
index 4c1f30a5fe7..42cc83c3037 100644
index 321bb6cfa81..1f34e7e9a54 100644
--- a/server/request.c
+++ b/server/request.c
@@ -107,6 +107,7 @@ static const struct object_ops master_socket_ops =
@ -679,10 +679,10 @@ index 6460acbf519..2b5ae29a45a 100644
timer_destroy /* destroy */
};
diff --git a/server/token.c b/server/token.c
index 2fa95e17aaf..8464eaf83eb 100644
index 23bc1cc13f7..3e8e60016a3 100644
--- a/server/token.c
+++ b/server/token.c
@@ -157,6 +157,7 @@ static const struct object_ops token_ops =
@@ -161,6 +161,7 @@ static const struct object_ops token_ops =
NULL, /* unlink_name */
no_open_file, /* open_file */
no_kernel_obj_list, /* get_kernel_obj_list */

View File

@ -1,4 +1,4 @@
From 6c4383e0d465d9cf79e772687111ac7b5d250b75 Mon Sep 17 00:00:00 2001
From d4791a079ee17b42ca668778f18335df471eba6b 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.
@ -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 dff246f5e74..708fe842020 100644
index 976dfb4fcc5..693f6290f9b 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -130,6 +130,8 @@
@ -106,7 +106,7 @@ index dff246f5e74..708fe842020 100644
#define MAX_DOS_DRIVES 26
#define FILE_WRITE_TO_END_OF_FILE ((LONGLONG)-1)
@@ -6464,6 +6466,57 @@ NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_clas
@@ -6678,6 +6680,57 @@ NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_clas
break;
}
@ -165,10 +165,10 @@ index dff246f5e74..708fe842020 100644
{
OBJECT_DATA_INFORMATION* p = ptr;
diff --git a/include/winternl.h b/include/winternl.h
index 347b79ef8e0..fbc52b7d127 100644
index 1182d1ff429..5dc7a9974b6 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -843,7 +843,7 @@ typedef enum _OBJECT_INFORMATION_CLASS {
@@ -844,7 +844,7 @@ typedef enum _OBJECT_INFORMATION_CLASS {
ObjectBasicInformation,
ObjectNameInformation,
ObjectTypeInformation,
@ -177,7 +177,7 @@ index 347b79ef8e0..fbc52b7d127 100644
ObjectDataInformation
} OBJECT_INFORMATION_CLASS, *POBJECT_INFORMATION_CLASS;
@@ -1281,9 +1281,35 @@ typedef struct _OBJECT_NAME_INFORMATION {
@@ -1304,9 +1304,35 @@ typedef struct _OBJECT_NAME_INFORMATION {
typedef struct __OBJECT_TYPE_INFORMATION {
UNICODE_STRING TypeName;
@ -215,10 +215,10 @@ index 347b79ef8e0..fbc52b7d127 100644
#ifdef __WINESRC__
DWORD_PTR ExitStatus;
diff --git a/server/directory.c b/server/directory.c
index 4d38393a6c8..799102379ff 100644
index b735602a805..d89da8b169b 100644
--- a/server/directory.c
+++ b/server/directory.c
@@ -72,6 +72,8 @@ static const struct object_ops object_type_ops =
@@ -73,6 +73,8 @@ static const struct object_ops object_type_ops =
no_destroy /* destroy */
};
@ -227,7 +227,7 @@ index 4d38393a6c8..799102379ff 100644
struct directory
{
@@ -236,7 +238,8 @@ struct object_type *get_object_type( const struct unicode_str *name )
@@ -238,7 +240,8 @@ struct object_type *get_object_type( const struct unicode_str *name )
{
if (get_error() != STATUS_OBJECT_NAME_EXISTS)
{
@ -237,7 +237,7 @@ index 4d38393a6c8..799102379ff 100644
make_object_static( &type->obj );
}
clear_error();
@@ -563,3 +566,17 @@ DECL_HANDLER(get_object_type)
@@ -553,3 +556,17 @@ DECL_HANDLER(get_object_type)
}
release_object( obj );
}
@ -256,10 +256,10 @@ index 4d38393a6c8..799102379ff 100644
+ else set_error( STATUS_NO_MORE_ENTRIES );
+}
diff --git a/server/protocol.def b/server/protocol.def
index bf2d8bfd167..def84b35967 100644
index 98289c685da..57ced5b1683 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3533,6 +3533,15 @@ struct handle_info
@@ -3472,6 +3472,15 @@ struct handle_info
@END
@ -272,8 +272,8 @@ index bf2d8bfd167..def84b35967 100644
+@END
+
+
/* Unlink a named object */
@REQ(unlink_object)
/* Query the impersonation level of an impersonation token */
@REQ(get_token_impersonation_level)
obj_handle_t handle; /* handle to the object */
--
2.27.0

View File

@ -1,4 +1,4 @@
From d67ca0757315f863020402e44c50b89f08be3ae6 Mon Sep 17 00:00:00 2001
From b230ad8676c16e2c02b6c317b0c050494225c696 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 8 Jun 2017 23:50:03 +0200
Subject: [PATCH] programs/winedevice: Load some common drivers and fix ldr
@ -10,7 +10,7 @@ Subject: [PATCH] programs/winedevice: Load some common drivers and fix ldr
2 files changed, 76 insertions(+)
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c
index fa8d7b20e3e..176b60d66ad 100644
index 0671a56efc7..85327c6f4b3 100644
--- a/dlls/ntoskrnl.exe/tests/driver.c
+++ b/dlls/ntoskrnl.exe/tests/driver.c
@@ -46,6 +46,7 @@ static const WCHAR driver_link[] = {'\\','D','o','s','D','e','v','i','c','e','s'
@ -29,8 +29,8 @@ index fa8d7b20e3e..176b60d66ad 100644
static void test_lookup_thread(void)
{
NTSTATUS status;
@@ -1996,6 +1998,52 @@ static void test_process_memory(const struct test_input *test_input)
ObDereferenceObject(process);
@@ -2072,6 +2074,52 @@ static void test_permanence(void)
ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "got %#x\n", status);
}
+static void test_default_modules(void)
@ -82,7 +82,7 @@ index fa8d7b20e3e..176b60d66ad 100644
static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *stack)
{
ULONG length = stack->Parameters.DeviceIoControl.OutputBufferLength;
@@ -2042,6 +2090,7 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st
@@ -2118,6 +2166,7 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st
test_stack_callout();
test_lookaside_list();
test_ob_reference(test_input->path);
@ -90,7 +90,7 @@ index fa8d7b20e3e..176b60d66ad 100644
test_resource();
test_lookup_thread();
test_IoAttachDeviceToDeviceStack();
@@ -2296,6 +2345,7 @@ NTSTATUS WINAPI DriverEntry(DRIVER_OBJECT *driver, PUNICODE_STRING registry)
@@ -2392,6 +2441,7 @@ NTSTATUS WINAPI DriverEntry(DRIVER_OBJECT *driver, PUNICODE_STRING registry)
DbgPrint("loading driver\n");
driver_obj = driver;
@ -137,5 +137,5 @@ index 0755caaafb0..6595788053e 100644
if (!(stop_event = CreateEventW( NULL, TRUE, FALSE, NULL )))
return;
--
2.26.2
2.27.0

View File

@ -1 +1 @@
42cb7d2ad1caba08de235e6319b9967296b5d554
9415667cdfbb4c94cdfe03a1e80a87482bee98c1