Hi everyone,
I’m been wrestling with implementing renames in a reparse minifilter. Following the example “simrep” minifilter posted by microsoft, it seems I’m supposed to be able to call FltGetDestinationFileNameInformation() and it will give me the correct reparsed filename back. However, I have been getting STATUS_INVALID_PARAMETER back from this function if I pass in a destination file name that is a symlink to a UNC path.
Let’s say I have \server\share\file.txt and I want to rename it to \server\share\file2.txt:
move \server\share\file.txt \server\share\file2.txt
Issuing the command above will enter my minifilter and the call to FltGetDestinationFileName succeeds, resulting in the file name \Device\Mup\server\share\file2.txt.
mklink /d C:\test \server\share
move C:\test\file.txt C:\test\file2.txt
The second command above enters the filter again, but this time FltGetDestinationFileNameInformation returns STATUS_INVALID_PARAMETER.
I don’t have a “real” symlink in the reparse minifilter, but I’m hoping that the mklink /d step duplicates what is normally happening – after all, I’m seeing the same result: FltGetDestinationFileNameInfromation will call my PreCreateFile callback, which I will return it IO_REPARSE / STATUS_REPARSE. Then the function simply returns STATUS_INVALID_PARAMETER.
Any ideas? I appreciate them!
Thanks
Stephen