Zebediah Figura : ntdll: Pass the token to NtCreateUserProcess().
Alexandre Julliard
julliard at winehq.org
Thu Sep 24 15:49:05 CDT 2020
Module: wine
Branch: master
Commit: 6cf3561ff3df814e7450d63769620441e4ea1265
URL: https://source.winehq.org/git/wine.git/?a=commit;h=6cf3561ff3df814e7450d63769620441e4ea1265
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Wed Sep 23 23:44:53 2020 -0500
ntdll: Pass the token to NtCreateUserProcess().
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/process.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index b6b0f10b9b..4cf83753a7 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -56,12 +56,12 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
RTL_USER_PROCESS_PARAMETERS *params,
SECURITY_DESCRIPTOR *process_descr,
SECURITY_DESCRIPTOR *thread_descr,
- HANDLE parent, BOOLEAN inherit, HANDLE debug, HANDLE exception,
+ HANDLE parent, BOOLEAN inherit, HANDLE debug, HANDLE token,
RTL_USER_PROCESS_INFORMATION *info )
{
OBJECT_ATTRIBUTES process_attr, thread_attr;
PS_CREATE_INFO create_info;
- ULONG_PTR buffer[offsetof( PS_ATTRIBUTE_LIST, Attributes[5] ) / sizeof(ULONG_PTR)];
+ ULONG_PTR buffer[offsetof( PS_ATTRIBUTE_LIST, Attributes[6] ) / sizeof(ULONG_PTR)];
PS_ATTRIBUTE_LIST *attr = (PS_ATTRIBUTE_LIST *)buffer;
UINT pos = 0;
@@ -98,6 +98,14 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
attr->Attributes[pos].ReturnLength = NULL;
pos++;
}
+ if (token)
+ {
+ attr->Attributes[pos].Attribute = PS_ATTRIBUTE_TOKEN;
+ attr->Attributes[pos].Size = sizeof(token);
+ attr->Attributes[pos].ValuePtr = token;
+ attr->Attributes[pos].ReturnLength = NULL;
+ pos++;
+ }
attr->TotalLength = offsetof( PS_ATTRIBUTE_LIST, Attributes[pos] );
InitializeObjectAttributes( &process_attr, NULL, 0, NULL, process_descr );
More information about the wine-cvs
mailing list