Using smbclient 3.3 to transfer a file from a NT4 box (with SP6a) results in file corruption:
$ smbclient \\\\galah\\dev_tools
Domain=[MATRIX_SCIENCE] OS=[Windows NT 4.0] Server=[NT LAN Manager 4.0]
smb: \> cd python\2.4\Lib\test
smb: \python\2.4\Lib\test\> get test_datetime.py
getting file \python\2.4\Lib\test\test_datetime.py of size 133244 as test_datetime.py (2069.9 kb/s) (average 2069.9 kb/s)
smb: \python\2.4\Lib\test\> quit
$ cksum test_datetime_orig.py test_datetime.py
2759204463 133244 test_datetime_orig.py
3324866967 125056 test_datetime.py
Corruption always seems to occur at 60KB chunks where a block of data is missing (internal buffer is truncated somewhere?). Changing the transmit buffer size (eg. "-b 1200") doesn't make any difference to the end result.
Using the same smbclient to transfer the file from Win2000 works just fine. If you use smbclient 3.0 (CentOS 4) then it transfers the file from the NT4 box without corruption.
$ lsb_release -d
Description: Debian GNU/Linux 5.0.3 (lenny)
$ apt-cache policy sernet-samba
*** 3.3.7-25 0
500 http://ftp.sernet.de lenny/main Packages
Created attachment 4716 [details]
Test file used in transfer tests
Created attachment 4717 [details]
Log file for corrupt transfer
Created attachment 4718 [details]
Log file for corrupt transfer (with -b 1200)
Created attachment 4719 [details]
Log file for successful transfer
This might be a bug that I just fixed in master. Can you please also upload a network trace of a failure to make sure? Information on how to create useful network traces can be found under http://wiki.samba.org/index.php/Capture_Packets
Sure. Is the file transfer itself sufficient, or do you need the SMB session setup as well?
For that particular bug the file transfer as such is sufficient. If you can, please also send the session setup, maybe the problem is somewhere else.
With https://bugzilla.samba.org/attachment.cgi?id=4720&action=view I've uploaded a port of the fixes for the original bug 6606. Can you try if that helps? Please nevertheless upload the network trace.
Created attachment 4721 [details]
Packet capture of file transfer
(In reply to comment #9)
> Created an attachment (id=4721) [details]
> Packet capture of file transfer
Thanks! Yes, the patch should do it. We asked for 65534 bytes but only got 61440. The patch in https://bugzilla.samba.org/attachment.cgi?id=4720&action=view for bug 6606 fixes exactly that. Is there any way you can try that?
*** This bug has been marked as a duplicate of bug 6606 ***