https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f5fc9e0cf2d8d33fa65ef8...
commit f5fc9e0cf2d8d33fa65ef8be74911da2f5d5c875 Author: Thomas Faber thomas.faber@reactos.org AuthorDate: Sat Jan 19 11:45:33 2019 +0100 Commit: Thomas Faber thomas.faber@reactos.org CommitDate: Sat Feb 2 23:02:50 2019 +0100
[NTOS:OB] Correctly handle OBJ_PROTECT_CLOSE in ObDuplicateObject. --- ntoskrnl/ob/obhandle.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/ntoskrnl/ob/obhandle.c b/ntoskrnl/ob/obhandle.c index 057cdecd7f..38171d2f16 100644 --- a/ntoskrnl/ob/obhandle.c +++ b/ntoskrnl/ob/obhandle.c @@ -2443,6 +2443,12 @@ ObDuplicateObject(IN PEPROCESS SourceProcess, return Status; }
+ if (NewHandleEntry.ObAttributes & OBJ_PROTECT_CLOSE) + { + NewHandleEntry.ObAttributes &= ~OBJ_PROTECT_CLOSE; + NewHandleEntry.GrantedAccess |= ObpAccessProtectCloseBit; + } + /* Now create the handle */ NewHandle = ExCreateHandle(HandleTable, &NewHandleEntry); if (!NewHandle)