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.

Attachment: smb1-remame-info.pcap
Description: application/vnd.tcpdump.pcap

_______________________________________________
cifs-protocol mailing list
cifs-protocol@lists.samba.org
https://lists.samba.org/mailman/listinfo/cifs-protocol

Reply via email to