FltGetDestinationFileNameInformation on DFS

Hi,

Anyone else noticed FltGetDestinationFileNameInformation fails
on a DFS link for directories? For example, I have DFSRoot on ServerA,
with link DFSShare pointing to ClientB\Test. If I try to rename
\ServerA\DFSRoot\DFSShare\SomeFolder I cannot get the destination file
name. The status is STATUS_NOT_SAME_DEVICE. Only DfsDriver and my
mini-filter are loaded on the system (vanilla Srv2003).
This is how I call the API:
(lpRenameFileInfo is the Data->Iopb->Parameters…)
FltGetDestinationFileNameInformation(Data->Iopb->TargetInstance,

Data->Iopb->TargetFileObject,

lpRenameFileInfo->RootDirectory,

lpRenameFileInfo->FileName,

lpRenameFileInfo->FileNameLength,

FLT_FILE_NAME_NORMALIZED |

FLT_FILE_NAME_QUERY_DEFAULT,
&lpRenameFileName);


Kind regards, Dejan
http://www.alfasp.com
File system audit, security and encryption kits.

Would someone confirm if I’m calling the API with the right parameters,
or if I’m looking at a FltMgr bug?

Dejan Maksimovic wrote:

Hi,

Anyone else noticed FltGetDestinationFileNameInformation fails
on a DFS link for directories? For example, I have DFSRoot on ServerA,
with link DFSShare pointing to ClientB\Test. If I try to rename
\ServerA\DFSRoot\DFSShare\SomeFolder I cannot get the destination file
name. The status is STATUS_NOT_SAME_DEVICE. Only DfsDriver and my
mini-filter are loaded on the system (vanilla Srv2003).
This is how I call the API:
(lpRenameFileInfo is the Data->Iopb->Parameters…)
FltGetDestinationFileNameInformation(Data->Iopb->TargetInstance,

Data->Iopb->TargetFileObject,

lpRenameFileInfo->RootDirectory,

lpRenameFileInfo->FileName,

lpRenameFileInfo->FileNameLength,

FLT_FILE_NAME_NORMALIZED |

FLT_FILE_NAME_QUERY_DEFAULT,
&lpRenameFileName);


Kind regards, Dejan
http://www.alfasp.com
File system audit, security and encryption kits.

> Would someone confirm if I’m calling the API with the right parameters,

or if I’m looking at a FltMgr bug?

Thats how I’ve always called it, but I’ve no experience of using it
alongside DFS so I cannot comment on you report. Have you stepped through
the code to see where it the status comes from?

No. I don’t think I should go that far.
Now, the funny part is this fails even if OPENED (and not NORMALIZED) path is
asked for. Which suggests a problem with FltMgr. But I can be wrong…

Rod Widdowson wrote:

> Would someone confirm if I’m calling the API with the right parameters,
> or if I’m looking at a FltMgr bug?

Thats how I’ve always called it, but I’ve no experience of using it alongside DFS
so I cannot comment on you report. Have you stepped through the code to see where
it the status comes from?


Kind regards, Dejan
http://www.alfasp.com
File system audit, security and encryption kits.

Hello, Dejan - These look like good call parameters to me.- Cheers, Lyndon

“Dejan Maksimovic” wrote in message news:xxxxx@ntfsd…
>
> Would someone confirm if I’m calling the API with the right parameters,
> or if I’m looking at a FltMgr bug?
>
> Dejan Maksimovic wrote:
>
>> Hi,
>>
>> Anyone else noticed FltGetDestinationFileNameInformation fails
>> on a DFS link for directories? For example, I have DFSRoot on ServerA,
>> with link DFSShare pointing to ClientB\Test. If I try to rename
>> \ServerA\DFSRoot\DFSShare\SomeFolder I cannot get the destination file
>> name. The status is STATUS_NOT_SAME_DEVICE. Only DfsDriver and my
>> mini-filter are loaded on the system (vanilla Srv2003).
>> This is how I call the API:
>> (lpRenameFileInfo is the Data->Iopb->Parameters…)
>> FltGetDestinationFileNameInformation(Data->Iopb->TargetInstance,
>>
>> Data->Iopb->TargetFileObject,
>>
>> lpRenameFileInfo->RootDirectory,
>>
>> lpRenameFileInfo->FileName,
>>
>> lpRenameFileInfo->FileNameLength,
>>
>> FLT_FILE_NAME_NORMALIZED |
>>
>> FLT_FILE_NAME_QUERY_DEFAULT,
>> &lpRenameFileName);
>
> –
> Kind regards, Dejan
> http://www.alfasp.com
> File system audit, security and encryption kits.
>
>
>