mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 22:56:00 +00:00
[NTOS:OB] Acquire the lock before setting directory's session ID
This commit is contained in:
parent
0b4763f1b1
commit
19cdb521d2
1 changed files with 9 additions and 1 deletions
|
@ -1849,9 +1849,17 @@ NtSetInformationObject(IN HANDLE ObjectHandle,
|
||||||
NULL);
|
NULL);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* FIXME: Missng locks */
|
/* Setup a lookup context */
|
||||||
|
OBP_LOOKUP_CONTEXT LookupContext;
|
||||||
|
ObpInitializeLookupContext(&LookupContext);
|
||||||
|
|
||||||
/* Set its session ID */
|
/* Set its session ID */
|
||||||
|
ObpAcquireDirectoryLockExclusive(Directory, &LookupContext);
|
||||||
Directory->SessionId = PsGetCurrentProcessSessionId();
|
Directory->SessionId = PsGetCurrentProcessSessionId();
|
||||||
|
ObpReleaseDirectoryLock(Directory, &LookupContext);
|
||||||
|
|
||||||
|
/* We're done, release the context and dereference the directory */
|
||||||
|
ObpReleaseLookupContext(&LookupContext);
|
||||||
ObDereferenceObject(Directory);
|
ObDereferenceObject(Directory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue