[NTOSKRNL] Call IoCreateFileSpecifyDeviceObjectHint with the hint if it was specified

This commit is contained in:
Pierre Schweitzer 2018-10-03 21:28:11 +02:00
parent 1a9b50690a
commit 15b9a6aa4c
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -905,14 +905,16 @@ IopOpenLinkOrRenameTarget(OUT PHANDLE Handle,
RenameInfo->RootDirectory,
NULL);
/* And open its parent directory */
/* And open its parent directory
* Use hint if specified
*/
if (FileObject->Flags & FO_FILE_OBJECT_HAS_EXTENSION)
{
PFILE_OBJECT_EXTENSION FileObjectExtension;
ASSERT(!(FileObject->Flags & FO_DIRECT_DEVICE_OPEN));
#if 0
/* Commented out - we don't support FO extension yet
* FIXME: Corrected last arg when it's supported
*/
FileObjectExtension = FileObject->FileObjectExtension;
Status = IoCreateFileSpecifyDeviceObjectHint(&TargetHandle,
DesiredAccess | SYNCHRONIZE,
&ObjectAttributes,
@ -927,12 +929,7 @@ IopOpenLinkOrRenameTarget(OUT PHANDLE Handle,
CreateFileTypeNone,
NULL,
IO_FORCE_ACCESS_CHECK | IO_OPEN_TARGET_DIRECTORY | IO_NO_PARAMETER_CHECKING,
FileObject->DeviceObject);
#else
ASSERT(FALSE);
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
#endif
FileObjectExtension->TopDeviceObjectHint);
}
else
{