mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:55:42 +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);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
/* FIXME: Missng locks */
|
||||
/* Setup a lookup context */
|
||||
OBP_LOOKUP_CONTEXT LookupContext;
|
||||
ObpInitializeLookupContext(&LookupContext);
|
||||
|
||||
/* Set its session ID */
|
||||
ObpAcquireDirectoryLockExclusive(Directory, &LookupContext);
|
||||
Directory->SessionId = PsGetCurrentProcessSessionId();
|
||||
ObpReleaseDirectoryLock(Directory, &LookupContext);
|
||||
|
||||
/* We're done, release the context and dereference the directory */
|
||||
ObpReleaseLookupContext(&LookupContext);
|
||||
ObDereferenceObject(Directory);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue