fixed initialization of the object attributes in CreateJobObjectW()

svn path=/trunk/; revision=11009
This commit is contained in:
Thomas Bluemel 2004-09-23 18:55:18 +00:00
parent 808e28016e
commit 3d915100ab

View file

@ -1,4 +1,4 @@
/* $Id: job.c,v 1.3 2004/09/23 18:46:10 weiden Exp $ /* $Id: job.c,v 1.4 2004/09/23 18:55:18 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -65,6 +65,7 @@ CreateJobObjectW(LPSECURITY_ATTRIBUTES lpJobAttributes,
{ {
UNICODE_STRING JobName; UNICODE_STRING JobName;
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
ULONG Attributes = 0;
PVOID SecurityDescriptor; PVOID SecurityDescriptor;
HANDLE hJob; HANDLE hJob;
NTSTATUS Status; NTSTATUS Status;
@ -78,7 +79,7 @@ CreateJobObjectW(LPSECURITY_ATTRIBUTES lpJobAttributes,
{ {
if(lpJobAttributes->bInheritHandle) if(lpJobAttributes->bInheritHandle)
{ {
ObjectAttributes.Attributes |= OBJ_INHERIT; Attributes |= OBJ_INHERIT;
} }
SecurityDescriptor = lpJobAttributes->lpSecurityDescriptor; SecurityDescriptor = lpJobAttributes->lpSecurityDescriptor;
} }
@ -89,7 +90,7 @@ CreateJobObjectW(LPSECURITY_ATTRIBUTES lpJobAttributes,
InitializeObjectAttributes(&ObjectAttributes, InitializeObjectAttributes(&ObjectAttributes,
((lpName != NULL) ? &JobName : NULL), ((lpName != NULL) ? &JobName : NULL),
0, Attributes,
NULL, NULL,
SecurityDescriptor); SecurityDescriptor);