Daniel Lehman dlehman25@gmail.com writes:
@@ -1639,7 +1639,10 @@ NTSTATUS WINAPI NtDuplicateObject( HANDLE source_process, HANDLE source, HANDLE ACCESS_MASK access, ULONG attributes, ULONG options ) { NTSTATUS ret;
int fd = -1;
if (options & DUPLICATE_CLOSE_SOURCE)
fd = remove_fd_from_cache( source );
I'm afraid it's not that simple, there's no guarantee that the source handle is for the current process.