reactos/ntoskrnl
George Bișoc f9c603db6e
[NTOS:OB] Do not close the handle if it's granted access to ObpAccessProtectCloseBit
As of now the Object Manager private service, ObpCloseHandleTableEntry, looks for OBJ_PROTECT_CLOSE attribute if a handle should not be closed. However, in ObDuplicateObject if an attribute of OBJ_PROTECT_CLOSE is found as it's been filled to the caller (see L2466) this attribute is removed from the attributes list of the new handle and ObpAccessProtectCloseBit access is granted to the newly duplicated object handle.

With that being said ObpCloseHandleTableEntry indiscriminately closes the object handle albeit it shouldn't do so. As a matter of fact in Windows Server 2003 SP2 this service indeed checks for ObpAccessProtectCloseBit flag bit and if the condition is met then it returns STATUS_HANDLE_NOT_CLOSABLE as it should. Therefore we should do the same.

Now NtClose can properly warn the calling thread the object handle can't be closed which fixes a testcase failure within NtDuplicateObject NTDLL APITEST where this function gives handle close protection bit as requested by the caller.
2021-04-26 19:36:38 +02:00
..
cache [NTOS:MM] Fix a bit the page-out/page-in logic 2021-04-08 15:40:37 +02:00
cc [NTOS:MM] Fix PFN tracing 2021-03-30 16:26:43 +02:00
config [NDK] DATA_SEG requires an extra #pragma on MSVC 2021-04-09 04:38:35 +03:00
dbgk [REACTOS] Cleanup INIT and some PAGE section allocations 2020-11-02 21:45:31 +03:00
ex [NTOS:EX] Use RtlCutoverTimeToSystemTime to determine the current time zone id 2021-04-03 09:38:07 +02:00
fsrtl [NTOS:FSRTL] Properly leave FsRtl when returning STATUS_CANT_WAIT 2021-02-03 09:41:23 +01:00
fstub [NTOS:FSTUB] Addendum to 29615fee and 8d2fe541: Further remove useless casts. 2020-12-07 22:52:42 +01:00
inbv Happy New Year 2021 to the ReactOS Community!! 2021-01-01 00:00:00 +01:00
include [NTOS:OB] Do not close the handle if it's granted access to ObpAccessProtectCloseBit 2021-04-26 19:36:38 +02:00
io [NTOS:PNP] PiSetDevNodeText: Do not overwrite existing DeviceDesc values 2021-04-05 14:33:48 +02:00
kd [NTOS:KD] KdpDebugLogInit(): Close the thread handle 2021-03-03 09:01:37 +01:00
kd64 [NTOS:KD] Avoid large stack buffer in KdpPrint. CORE-17215 2020-11-27 10:31:45 +01:00
kdbg [NTOS:KD] Use a PCONTEXT instead of a PKTRAP_FRAME in KDBG 2020-11-16 08:55:03 +01:00
ke [NTOS:KE] Both KeFindConfigurationEntry() and KeFindConfigurationNextEntry() functions are exported by NTOSKRNL, so they definitively must NOT be in the discardable INIT section!! 2021-04-10 00:43:52 +02:00
lpc [REACTOS] Cleanup INIT and some PAGE section allocations 2020-11-02 21:45:31 +03:00
mm [NTOS:MM] MiSetPagingOfDriver(): Add an explicit #if around unreachable code 2021-04-26 10:27:20 +02:00
ntkrnlmp [CMAKE] Use the "kernel" module type for ntoskrnl and ntkrnlmp 2021-03-23 11:18:43 +01:00
ob [NTOS:OB] Do not close the handle if it's granted access to ObpAccessProtectCloseBit 2021-04-26 19:36:38 +02:00
po [NTOS:PO] Flush dirty pages after flushing volumes 2021-02-03 09:41:23 +01:00
ps [NTOS:PS] Guard the quota in a spin lock (#3419) 2021-03-04 04:43:30 +03:00
rtl [NTOS:RTL] Implement the kernel-mode version of RtlGetNtProductType (#3029) 2020-08-26 17:40:45 +03:00
se [NTOS:SE] Lock the token in SeQueryInformationToken and do some cleanup 2021-04-18 13:56:37 +02:00
tests Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
vdm [REACTOS] Cleanup INIT and some PAGE section allocations 2020-11-02 21:45:31 +03:00
vf Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
wmi [NTOS:WMI] Be consistent about potential NULL pointer use 2021-02-18 10:24:53 +01:00
CMakeLists.txt [CMAKE] Use the "kernel" module type for ntoskrnl and ntkrnlmp 2021-03-23 11:18:43 +01:00
guid.c [NTOSKRNL] Rewrite IoAssignDriveLetters to make NT5 compliant 2019-10-21 18:28:40 +02:00
KrnlFun.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
ntdll.S Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
ntos.cmake [NTOS:MM] Share "page.c" between i386 & amd64 builds 2021-04-08 15:40:37 +02:00
ntoskrnl.rc [NTOS:INBV] Refactor boot screen code and resources (#1649) 2019-08-20 01:52:25 +02:00
ntoskrnl.spec [NTOSKRNL] Fix link with GCC x64 2021-01-28 23:10:01 +01:00
sysfuncs.lst Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00