[cifs-protocol] SMB1 processing of FileRnameInfo
uri at samba.org
Sun May 7 11:12:21 UTC 2017
I tried renaming files over SMB1 protocol using pass-through info-level
of FileRenameInfo (cf [MS-SMB] 126.96.36.199.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,
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6049 bytes
Desc: not available
More information about the cifs-protocol