It seems latest rsync pass -e to the remote server to specify rsync client is a preversion (A thing I understand because -e works on all rsync version). However, this cause problems on server having options restriction, like denying -e because it allow to execute any command on it. So I suggest this patch to limit effect to unstable version of clients. WDYT ? Regards. Index: options.c ==================================================================--- options.c +++ options.c 2008-03-19 18:38:56.000000000 +0100 @@ -1837,14 +1837,14 @@ /* We make use of the -e option to let the server know about any * pre-release protocol version && some behavior flags. */ - argstr[x++] = 'e'; #if SUBPROTOCOL_VERSION != 0 + argstr[x++] = 'e'; if (protocol_version == PROTOCOL_VERSION) { x += snprintf(argstr+x, sizeof argstr - x, "%d.%d", PROTOCOL_VERSION, SUBPROTOCOL_VERSION); } else -#endif argstr[x++] = '.'; +#endif set_allow_inc_recurse(); if (allow_inc_recurse) argstr[x++] = 'i'; -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. Url : http://lists.samba.org/archive/rsync/attachments/20080319/897cba64/attachment.bin
On Wed, 2008-03-19 at 19:55 +0100, Olivier Thauvin wrote:> It seems latest rsync pass -e to the remote server to specify rsync client is > a preversion (A thing I understand because -e works on all rsync version). > However, this cause problems on server having options restriction, like > denying -e because it allow to execute any command on it. > > So I suggest this patch to limit effect to unstable version of clients.As you'll see in the lines of code following your change, -e is used to signal incremental-recursion and symlink-times support as well as the use of an unreleased protocol, so it shouldn't be conditioned solely on the unreleased protocol. -e does not cause an rsync *server* to execute arbitrary commands (it is used as a remote-shell command only by clients), so it is safe and restricted-rsync setups need to be updated to accept it. ?Note: the "support/rrsync" in the rsync 3.0.0 release wasn't updated to accept -e, but the current development version accepts it. If you as a client are stuck communicating with an old restricted-rsync setup that rejects -e, you can specify as your remote shell command (using the client -e option) a wrapper script that removes the -e part from the server command. Matt