-e escape rule

Wayne Davison wayned at samba.org
Sat Oct 29 15:49:37 UTC 2016

On Sat, Oct 29, 2016 at 5:36 AM, Samuel Williams <
space.ship.traveller at gmail.com> wrote:

> The command
> ssh -l backup -i /etc/synco/id_rsa -o ConnectTimeout\=60 -o BatchMode\=yes
> Is a correct and valid shell command.

It is, but there is no shell involved, and assuming that a shell is being
used is invalid. Adding backslash escaping now could potentially screw up
anyone currently passing a backslash in their existing rsync scripts (a
small group of people, but probably non-zero). It's tempting to go ahead
and do this, but I think I'll just leave it as it is.

If you want to work around that buggy escaping library, you could change
"ssh" to "ssh-nobs" and put the following into that file:

exec 'ssh', map { s/\\(.)/$1/g; $_ } @ARGV;

That adds backslash removal on the way to the ssh.  It does not allow you
to backslash escape spaces, though, but someone could extend the script to
support that.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20161029/61695557/attachment.html>

More information about the rsync mailing list