[cifs-protocol] [REG:117050715700170] SMB1 processing of FileRnameInfo
bburgin at microsoft.com
Tue May 9 15:54:26 UTC 2017
I can research this for you. Let me look at the code. Can you send me the source of your test program; that will save me the time of doing the same.
From: Tarun Chopra
Sent: Sunday, May 7, 2017 10:28 AM
To: Uri Simchoni <uri at samba.org>
Cc: cifs-protocol at lists.samba.org; MSSolve Case Email <casemail at microsoft.com>
Subject: [REG:117050715700170] SMB1 processing of FileRnameInfo
We have created a case; 117050715700170, to track your inquiry and an Escalation Engineer will contact you by tomorrow to assist further.
Tarun Chopra | Sr. Escalation Engineer
Open Specifications Support Team
Email tarun.chopra at microsoft.com
Monday-Friday 9:00a-6:00p Pacific Timezone
From: Uri Simchoni [mailto:uri at samba.org]
Sent: Sunday, May 7, 2017 4:12 AM
To: Interoperability Documentation Help <dochelp at microsoft.com>
Cc: cifs-protocol at lists.samba.org
Subject: SMB1 processing of FileRnameInfo
I tried renaming files over SMB1 protocol using pass-through info-level of FileRenameInfo (cf [MS-SMB] 18.104.22.168.5). When doing this against a Windows 2012R2 machine, it fails with STATUS_NOT_SUPPORTED.
The advantage of using FileRenameInfo instead of using SMB Rename would be that if the destination file exists, the rename can be atomic without having to delete the destination file first.
Looking for encoding / other errors in my client code, I tried to see what Windows does as a client. I wrote a short program that uses SetFileInformationByHandle(). The program worked, but to my surprise, the Windows client didn't pass through the FileRenameInfo over SMB.
Rather it deleted the dest file and made an SMB Rename call (that is, two operations).
All this seems to suggest that pass-through of FileRenameInfo is not supported over SMB1 by Windows servers.
Attached pls find a packet capture of the rename attempt (using Samba client code). The client creates test1.txt, then creates test.txt and tries renaming that to test1.txt, overwriting the older file.
More information about the cifs-protocol