mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Fix incorrect OpenProcess implementation in kernel32 and make it tidier. I'm now seeing a bug with Access rights...
svn path=/trunk/; revision=14665
This commit is contained in:
parent
9cafa059bd
commit
2b66d8f4fb
1 changed files with 6 additions and 11 deletions
|
@ -342,18 +342,13 @@ OpenProcess(DWORD dwDesiredAccess,
|
|||
CLIENT_ID ClientId;
|
||||
|
||||
ClientId.UniqueProcess = (HANDLE)dwProcessId;
|
||||
ClientId.UniqueThread = INVALID_HANDLE_VALUE;
|
||||
ClientId.UniqueThread = 0;
|
||||
|
||||
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
|
||||
ObjectAttributes.RootDirectory = (HANDLE)NULL;
|
||||
ObjectAttributes.SecurityDescriptor = NULL;
|
||||
ObjectAttributes.SecurityQualityOfService = NULL;
|
||||
ObjectAttributes.ObjectName = NULL;
|
||||
|
||||
if (bInheritHandle == TRUE)
|
||||
ObjectAttributes.Attributes = OBJ_INHERIT;
|
||||
else
|
||||
ObjectAttributes.Attributes = 0;
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
NULL,
|
||||
(bInheritHandle ? OBJ_INHERIT : 0),
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
errCode = NtOpenProcess(&ProcessHandle,
|
||||
dwDesiredAccess,
|
||||
|
|
Loading…
Reference in a new issue