Re[2]: Overwrite Issue when reparsing MS word to a different volume

If you find the problem is the rename and returning
STATUS_NOT_SAME_DEVICE does not convert it to a copy/delete, then yes,
you’ll need to implement it yourself as a copy/delete. That status code
will indicate to the calling application that it should perform a
copy/delete but not all applications will do that.

Pete


Kernel Drivers
Windows File System and Device Driver Consulting
www.KernelDrivers.com
866.263.9295

------ Original Message ------
From: xxxxx@yahoo.com
To: “Windows File Systems Devs Interest List”
Sent: 8/6/2017 1:07:10 AM
Subject: RE:[ntfsd] Overwrite Issue when reparsing MS word to a
different volume

>>NTFS does not support cross-volume renames
>
>Does this mean my solution will not work on NTFS even if I get it to
>the point which the rename is processed?
>
>Is there any work around? May I create the target and write the content
>then delete the source to simulate a rename in pre/post set information
>for a rename operation?
>
>—
>NTFSD is sponsored by OSR
>
>
>MONTHLY seminars on crash dump analysis, WDF, Windows internals and
>software drivers!
>Details at http:
>
>To unsubscribe, visit the List Server section of OSR Online at
>http:</http:></http:>

Thanks Pete

Further investigation shows that MS word call to NtSetInformationFile fails when the rename target is not in the same volume with STATUS_NOT_SAME_DEVICE.

But as I read in these threads :
http://osronline.com/showThread.CFM?link=223560
http://www.osronline.com/showThread.cfm?link=205385

I do not receive any set_information IRP and NtSetInformationFile fails in user mode. So it seams to be very hard to make it work in kernel mode, unless we can predict the rename when the file is being opened and create the same file in the target volume and mark the original file for deletion!!! which does not seam to be a safe solution.

As for user mode solutions the only choice seems to be hooking the user mode API and converting the rename to create&delete operation, as Maxim stated in above topics.

I am going to implement the hook approach and see how it works.

Any hint for me?

I am working on this issue yet,
I try to replace the rename with create + delete in user mode.But when I try to create the target file using NtCreatefile, I receive error 0xC0000033 STATUS_OBJECT_NAME_INVALID. What does this error imply?