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;
|
CLIENT_ID ClientId;
|
||||||
|
|
||||||
ClientId.UniqueProcess = (HANDLE)dwProcessId;
|
ClientId.UniqueProcess = (HANDLE)dwProcessId;
|
||||||
ClientId.UniqueThread = INVALID_HANDLE_VALUE;
|
ClientId.UniqueThread = 0;
|
||||||
|
|
||||||
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
ObjectAttributes.RootDirectory = (HANDLE)NULL;
|
NULL,
|
||||||
ObjectAttributes.SecurityDescriptor = NULL;
|
(bInheritHandle ? OBJ_INHERIT : 0),
|
||||||
ObjectAttributes.SecurityQualityOfService = NULL;
|
NULL,
|
||||||
ObjectAttributes.ObjectName = NULL;
|
NULL);
|
||||||
|
|
||||||
if (bInheritHandle == TRUE)
|
|
||||||
ObjectAttributes.Attributes = OBJ_INHERIT;
|
|
||||||
else
|
|
||||||
ObjectAttributes.Attributes = 0;
|
|
||||||
|
|
||||||
errCode = NtOpenProcess(&ProcessHandle,
|
errCode = NtOpenProcess(&ProcessHandle,
|
||||||
dwDesiredAccess,
|
dwDesiredAccess,
|
||||||
|
|
Loading…
Reference in a new issue