Bug 1558 - File corruption while writing file to AS/400
Summary: File corruption while writing file to AS/400
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: smbclient (show other bugs)
Version: 3.0.4
Hardware: x86 Linux
: P3 major
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
Depends on:
Reported: 2004-07-23 09:43 UTC by Fabien Chevalier
Modified: 2004-07-25 11:38 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Fabien Chevalier 2004-07-23 09:43:50 UTC
While writing a file to an AS/400 using smbclient, we get the following
"strange" behaviour:

fabien@dc-sorral-01:~$ smbclient // -Uxxxxxx%xxxxxx -c"cd pdf;
put testfile.txt"
session request to failed (Call returned zero bytes (EOF))
session requeå] Server=[æ®çed (Call returned zero bytes (EOF))
OS=[â½ã´â°ããã              Error writing file: SUCCESS - 0
putting file testfile.txt as \pdf\testfile.txt (0.0 kb/s) (average 0.0 kb/s)

The result file is effectively written to the AS/400 disk, but its size has
increased of about 64000 bytes: it has been padded with zeroes.

I can provide network traces, higher debug level output, or even access to the
faulty box to help troubleshoot the issue.



Linux: Debian Sarge (up to date on 23/07/2004)
Samba: 3.0.4-5 (Provided by Debian)
AS/400: OS/400 V5R?

Remark: has been tested with 3.0.2a - Same problem here.
        Win2K copies the same file correctly.
Comment 1 Fabien Chevalier 2004-07-25 11:38:48 UTC
Further testing using ethereal reveals this is definately an OS/400 bug. SMB_WRITE_AND_X file 
length parameter is ignored and OS/400 writes too many bytes on disk. 
The version used, V4R5, is way too old anyway. 
So i close my own bug. 
Fabien Chevalier