#359043 rsync: does not gracefully handle desynced options

Package:
rsync
Source:
rsync
Description:
fast, versatile, remote (and local) file-copying tool
Submitter:
Marc Haber
Date:
2014-07-10 12:24:12 UTC
Severity:
minor
#359043#5
Date:
2006-03-26 08:03:39 UTC
From:
To:
When using rsync over ssh in automated processes, it is common to use
an ssh key without passphrase to allow the process to happen
automatically. To decrease the danger of the passphraseless key, it is
common to use the "commands" option in the remote .ssh/authorized_keys
file to force a remote command to be executed. This also allows to
open up root connects to the remote host which only allow commands to
run that are explicitly configured on the remote side.

When one uses rsync in a setup like this, and the rsync parameters on
the local and remote side are not in sync, rsync fails with obscure
errors.

For example, if the remote side is forced to
rsync --server --sender -vlHogDtpr --delete --numeric-ids . /
and the local side says
rsync --rsh=ssh --progress remote-host:/ some-local-dir,
rsync fails with
ERROR: buffer overflow in receive_file_entry
rsync error: error allocating core memory buffers (code 22) at util.c(126)

rsync should handle this case more gracefully, which would probably
need a protocol extension since the remote side would report its
parameters back over the connection so that the local side can compare
whether remote has actually invoked the server with the correct
parameters.

Greetings
Marc

#359043#10
Date:
2010-03-17 03:24:40 UTC
From:
To:
This is a won't fix.  Don't force a server command; instead, force a
single-use rsync daemon.  See:

https://bugzilla.samba.org/show_bug.cgi?id=4163#c4