alexm@hsys.msk.ru
2002-May-27 09:40 UTC
bug: copying unreadable file from remote host returns errorlevel 0
[ Please keep me in Cc: as I am not subscribed to this list ]
Hello,
we have noticed the following bug in rsync (including latest CVS
snapshot):
if I am copying from the remote host file that is unreadable by my
account, the error is reported properly, but the errorlevel returned
is 0.
$ rsync distanza:/etc/shadow .
send_files failed to open /etc/shadow: Permission denied
rsync error: some files could not be transferred (code 23) at main.c(348)
$ echo $?
0
If I'm trying to copy non-existent file, it returns proper errorlevel
$ rsync --rsync-path=/usr/local/rsync-cvs/bin/rsync distanza:/etc/shad .
link_stat /etc/shad : No such file or directory
rsync error: some files could not be transferred (code 23) at main.c(337)
client: nothing to do
$ echo $?
11
We tried to fix it by changing "continue" to "return":
--- sender.c.orig Mon May 27 20:36:34 2002
+++ sender.c Mon May 27 20:35:33 2002
@@ -184,7 +184,7 @@
rprintf(FERROR,"send_files failed to open
%s: %s\n",
fname,strerror(errno));
free_sums(s);
- continue;
+ return;
}
/* map the local file */
and the errorlevel is returned properly, but there are additional
messages:
send_files failed to open /etc/shadow: Permission denied
rsync error: some files could not be transferred (code 23) at main.c(348)
Invalid file index 24 in recv_files (count=1)
unexpected EOF in read_timeout
and we're not sure if that's ok.
Thanks a lot for your help,
--alexm
Dave Dykstra
2002-May-30 14:43 UTC
bug: copying unreadable file from remote host returns errorlevel 0
Does the fix at
http://lists.samba.org/pipermail/rsync/2002-February/006371.html
help you?
- Dave Dykstra
On Mon, May 27, 2002 at 08:38:42PM +0400, alexm@hsys.msk.ru
wrote:>
> [ Please keep me in Cc: as I am not subscribed to this list ]
>
> Hello,
>
> we have noticed the following bug in rsync (including latest CVS
> snapshot):
>
> if I am copying from the remote host file that is unreadable by my
> account, the error is reported properly, but the errorlevel returned
> is 0.
>
> $ rsync distanza:/etc/shadow .
> send_files failed to open /etc/shadow: Permission denied
> rsync error: some files could not be transferred (code 23) at main.c(348)
>
> $ echo $?
> 0
>
>
> If I'm trying to copy non-existent file, it returns proper errorlevel
>
> $ rsync --rsync-path=/usr/local/rsync-cvs/bin/rsync
distanza:/etc/shad .
> link_stat /etc/shad : No such file or directory
> rsync error: some files could not be transferred (code 23) at main.c(337)
> client: nothing to do
> $ echo $?
> 11
>
>
>
> We tried to fix it by changing "continue" to "return":
>
> --- sender.c.orig Mon May 27 20:36:34 2002
> +++ sender.c Mon May 27 20:35:33 2002
> @@ -184,7 +184,7 @@
> rprintf(FERROR,"send_files failed to
open %s: %s\n",
> fname,strerror(errno));
> free_sums(s);
> - continue;
> + return;
> }
>
> /* map the local file */
>
>
> and the errorlevel is returned properly, but there are additional
> messages:
>
> send_files failed to open /etc/shadow: Permission denied
> rsync error: some files could not be transferred (code 23) at main.c(348)
> Invalid file index 24 in recv_files (count=1)
> unexpected EOF in read_timeout
>
> and we're not sure if that's ok.
>
>
> Thanks a lot for your help,
>
> --alexm
>
> --
> To unsubscribe or change options:
http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html