The Samba-Bugzilla – Bug 6020
support/rrsync fails when server-side short options start with "-e"
Last modified: 2009-01-07 18:42:35 UTC
When using support/rrsync (rsync-3.0.4), if server-side options look like
the script fails, leading to a client-side message like this:
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(632) [sender=3.0.4]
This does not appear to happen when the 'e' follows other characters on the
server side. For example, "rsync -a file rem:." on the client side results in
arguments that look like this on the server: "--server -logDtpre.iLs . .".
In this case, everything is fine. On the other hand, if you try
"rsync file rem:." on the client side, the arguments on the server look
like this: "--server -e.Ls . .", and it fails.
I believe the problem is on line 147 of support/rrsync. If I change it from
next if /^-$short_no_arg+(e\d*\.\w*)?$/o || /^-$short_with_num\d+$/o;
next if /^-$short_no_arg*(e\d*\.\w*)?$/o || /^-$short_with_num\d+$/o;
the problem appears to go away.
I've checked in a fix into the git repository. Thanks!