[cifs-protocol] SMB1 processing of FileRnameInfo

Uri Simchoni uri at samba.org
Sun May 7 11:12:21 UTC 2017


Hi,

I tried renaming files over SMB1 protocol using pass-through info-level
of FileRenameInfo (cf [MS-SMB] 2.2.2.3.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.

Thanks,
Uri.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smb1-remame-info.pcap
Type: application/vnd.tcpdump.pcap
Size: 6049 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/cifs-protocol/attachments/20170507/7b048f60/smb1-remame-info.pcap>


More information about the cifs-protocol mailing list