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
* 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,
Since these releases, the corresponding source code
"trunk/source/client/clitar.c" does not seem to have changed in this way since
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 $?