Bug 3045 - smbclient tar creation does not handle well write errors
Summary: smbclient tar creation does not handle well write errors
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Client Tools (show other bugs)
Version: 3.0.14a
Hardware: All All
: P3 major
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-26 05:29 UTC by Pierre Bourgin
Modified: 2020-01-06 12:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Bourgin 2005-08-26 05:29:28 UTC
smbclient //machine/res pass -U user -Tc /smallfs/test.tar
does not handle well error on writing to file (or tape device).

If the filesystem becomes FULL while write test.tar file:

* In this case, the return code of smclient is 0, which is not right since an
error occured.

* smbclient logs "Error writing to tar file - No space left on device
Didn't get entire file. size=xxx, nread=yyy", but still continue to "download"
files from CIFS ressource. Annoying (waste time and cpu).


This happens (at least) with:
-  samba-3.0.5/Linux RedHat 9.0/x86, 
-  samba-2.2.8a/Solaris8/sparc,
-  samba-3.0.14a/Solaris8/sparc,

Since these releases, the corresponding source code
"trunk/source/client/clitar.c" does not seem to have changed in this way since
these releases.
Comment 1 Björn Jacke 2020-01-06 12:50:06 UTC
just checked with 4.11, smbclient exit code is 1 in that case and also no more files are transfered after the error occurs:

...
tar:1039 Fatal: Write error
NT_STATUS_UNSUCCESSFUL listing \t2\*
tar:718  do_list fail NT_STATUS_UNSUCCESSFUL
tar:736  Fatal: Write error
tar:373  tar_process failed
$ echo $?
1