Package: rsync
Version: 3.1.0-3
Severity: normal

The manpage gives the impression that if you need to use -e/--rsh and you
want the destination hostname somewhere other than the end of the command
line, you can put the token '%H' in the middle of the string and it'll be
replaced by the destination host.  But this does not work:

$ PATH=/usr/bin strace -f -eexecve rsync -av -e 'ssh %H sudo -n --' ./ 
remotehost:/backup
execve("/usr/bin/rsync", ["rsync", "-av", "-e", "ssh %H sudo -n --", "./", 
"remotehost:/backup"], [/* 36 vars */]) = 0
Process 15035 attached
[pid 15035] execve("/usr/bin/ssh", ["ssh", "%H", "sudo", "-n", "--", 
"remotehost", "rsync", "--server", "-vlogDtpre.iLs", ".", "/backup"], [/* 36 
vars */]) = 0
ssh: Could not resolve hostname %h: Name or service not known
Process 15035 detached
--- SIGCHLD (Child exited) @ 0 (0) ---
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.0]

You can see that the %H has been passed verbatim to ssh, and that the
remote hostname has been placed after the entire -e string.

The RSYNC_RSH environment variable (which is documented to be equivalent
to the -e option) exhibits the same bug.

The manpage is inconsistent about whether the token is %H or %h: neither
works.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (501, 'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.14-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages rsync depends on:
ii  base-files  7.3
ii  libacl1     2.2.52-1
ii  libc6       2.19-3
ii  libpopt0    1.16-8
ii  lsb-base    4.1+Debian13
ii  zlib1g      1:1.2.8.dfsg-1

rsync recommends no packages.

Versions of packages rsync suggests:
ii  openssh-client  1:6.6p1-5
ii  openssh-server  1:6.6p1-5

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to