Rebase against e10da7ab2e3d151c8347802600862aa608672f6f.

This commit is contained in:
Alistair Leslie-Hughes 2023-05-25 10:07:30 +10:00
parent fe6cfefe64
commit a580edefe1
3 changed files with 16 additions and 16 deletions

View File

@ -1,4 +1,4 @@
From b1fa0df72c80753864dd001f45278f45c162bb2e Mon Sep 17 00:00:00 2001
From 643461bc989bd848363241dcfa04187e8d3a84d1 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Fri, 21 May 2021 21:52:06 -0500
Subject: [PATCH] ntdll: Always start the initial process through start.exe.
@ -9,10 +9,10 @@ Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
1 file changed, 3 insertions(+), 23 deletions(-)
diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c
index 3c178350f2b..eb7a1d6c7e5 100644
index 30782a70eb0..959bafb28b7 100644
--- a/dlls/ntdll/unix/env.c
+++ b/dlls/ntdll/unix/env.c
@@ -1901,6 +1901,7 @@ static void init_peb( RTL_USER_PROCESS_PARAMETERS *params, void *module )
@@ -1909,6 +1909,7 @@ static void init_peb( RTL_USER_PROCESS_PARAMETERS *params, void *module )
*/
static RTL_USER_PROCESS_PARAMETERS *build_initial_params( void **module )
{
@ -20,11 +20,11 @@ index 3c178350f2b..eb7a1d6c7e5 100644
static const WCHAR valueW[] = {'1',0};
static const WCHAR pathW[] = {'P','A','T','H'};
RTL_USER_PROCESS_PARAMETERS *params = NULL;
@@ -1929,29 +1930,8 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params( void **module )
@@ -1937,29 +1938,8 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params( void **module )
add_registry_environment( &env, &env_pos, &env_size );
env[env_pos++] = 0;
- status = load_main_exe( NULL, main_argv[1], curdir, &image, module );
- status = load_main_exe( NULL, main_argv[1], curdir, 0, &image, module );
- if (!status)
- {
- char *loader;
@ -53,5 +53,5 @@ index 3c178350f2b..eb7a1d6c7e5 100644
main_wargv = build_wargv( get_dos_path( image ));
cmdline = build_command_line( main_wargv );
--
2.40.0
2.40.1

View File

@ -1,4 +1,4 @@
From 71aba24d166ee16f6ea52d1b63acabccf0532514 Mon Sep 17 00:00:00 2001
From 1eaa73714299df810d22a727e8053679d5e89f64 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sun, 18 Apr 2021 17:46:35 -0500
Subject: [PATCH] kernelbase: Elevate processes if requested in
@ -10,7 +10,7 @@ Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
1 file changed, 55 insertions(+), 2 deletions(-)
diff --git a/dlls/kernelbase/process.c b/dlls/kernelbase/process.c
index 35381f409e9..e64076cb860 100644
index 54a524abe04..7365bee9425 100644
--- a/dlls/kernelbase/process.c
+++ b/dlls/kernelbase/process.c
@@ -30,6 +30,7 @@
@ -21,7 +21,7 @@ index 35381f409e9..e64076cb860 100644
#include "kernelbase.h"
#include "wine/debug.h"
@@ -414,6 +415,54 @@ BOOL WINAPI DECLSPEC_HOTPATCH CloseHandle( HANDLE handle )
@@ -431,6 +432,54 @@ BOOL WINAPI DECLSPEC_HOTPATCH CloseHandle( HANDLE handle )
}
@ -76,16 +76,16 @@ index 35381f409e9..e64076cb860 100644
/**********************************************************************
* CreateProcessAsUserA (kernelbase.@)
*/
@@ -500,7 +549,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
@@ -517,7 +566,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
WCHAR *p, *tidy_cmdline = cmd_line;
RTL_USER_PROCESS_PARAMETERS *params = NULL;
RTL_USER_PROCESS_INFORMATION rtl_info;
- HANDLE parent = 0, debug = 0;
+ HANDLE parent = 0, debug = 0, elevated_token = NULL;
ULONG nt_flags = 0;
USHORT machine = 0;
NTSTATUS status;
@@ -608,6 +657,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
@@ -629,6 +678,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
if (flags & CREATE_BREAKAWAY_FROM_JOB) nt_flags |= PROCESS_CREATE_FLAGS_BREAKAWAY;
if (flags & CREATE_SUSPENDED) nt_flags |= PROCESS_CREATE_FLAGS_SUSPENDED;
@ -93,9 +93,9 @@ index 35381f409e9..e64076cb860 100644
+ token = elevated_token = get_elevated_token();
+
status = create_nt_process( token, debug, process_attr, thread_attr,
nt_flags, params, &rtl_info, parent, handle_list, job_list );
nt_flags, params, &rtl_info, parent, machine, handle_list, job_list );
switch (status)
@@ -649,7 +701,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
@@ -670,7 +722,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
TRACE( "started process pid %04lx tid %04lx\n", info->dwProcessId, info->dwThreadId );
}
@ -106,5 +106,5 @@ index 35381f409e9..e64076cb860 100644
if (tidy_cmdline != cmd_line) HeapFree( GetProcessHeap(), 0, tidy_cmdline );
return set_ntstatus( status );
--
2.34.1
2.40.1

View File

@ -1 +1 @@
f266dc094a9b4fbe95792ed706891609901834e3
e10da7ab2e3d151c8347802600862aa608672f6f