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.
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