rsync-3.1.1 não está sincronizando com o rsync-3.1.3

1

Eu recentemente atualizei para o Rtools-3.5 (auxiliar a esta questão) que inclui o rsync-3.1.3. Em um laptop diferente usando o Rtools-3.4 (rsync-3.1.1), um comando simples de rsync -aHAX remote:/path/to/dir/* . funciona muito bem, mas com 3.1.3 não funciona. Para solucionar problemas, copiei o executável rsync-3.1.1 (com cyg*.dll ) do Rtools-3.4, então agora tenho dois conjuntos de executáveis: 3.1.1 (antigo, funcionando) e 3.1.3 (novo, não funcionando) ). A versão 3.1.1 funciona.

A configuração ssh é idêntica, ssh-agent está funcionando bem (via KeePass / KeeAgent) e ssh -ing (de Git para Windows , versão OpenSSH_7.7p1, OpenSSL 1.0.2o 27 Mar 2018 se for importante) para o servidor remoto funciona sem problemas.

Eu pensei que outra pergunta " link " seria semelhante o suficiente, mas, nessa pergunta, todas as versões do rsync são o mesmo.

Versão mais antiga:

$ ~/rs/rsync --version
rsync  version 3.0.9  protocol version 30
Copyright (C) 1996-2011 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
    no socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, symtimes

Versão mais recente:

$ /c/Rtools/bin/rsync --version
rsync  version 3.1.3  protocol version 31
Copyright (C) 1996-2018 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, no xattrs, iconv, symtimes, prealloc

Eu tento rsync -e 'ssh -vv' ... e nada parece atrapalhar: o log não relata problemas, as chaves são aceitas e termina com:

debug2: input_userauth_pk_ok: fp SHA256:g2VNSDTf5fNp46rZUo4GmAVi84gSNA9nNbT9KKfGXP0
debug1: Enabling compression at level 6.
debug1: Authentication succeeded (publickey).
Authenticated to my.remote.host ([11.22.33.44]:22).
dup() in/out/err failed
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.3]

O mesmo comando com 3.1.1 funciona bem. Esse erro geralmente indica que o diretório / arquivo remoto não existe, mas obviamente esse não é o caso (desde que o 3.1.1 funciona).

Parece que o Rtools mudou suas opções de compilação, porque comparar as capacidades dos dois revela algumas diferenças:

## Versions:       3.1.1                          3.1.3
$ diff -uw <( ~/rs/rsync --help) <( /c/Rtools/bin/rsync --help) | head -n 20
--- /dev/fd/63  2018-08-12 17:48:25.000000000 -0700
+++ /dev/fd/62  2018-08-12 17:48:25.000000000 -0700
@@ -1,10 +1,10 @@
-rsync  version 3.0.9  protocol version 30
-Copyright (C) 1996-2011 by Andrew Tridgell, Wayne Davison, and others.
+rsync  version 3.1.3  protocol version 31
+Copyright (C) 1996-2018 by Andrew Tridgell, Wayne Davison, and others.
 Web site: http://rsync.samba.org/
 Capabilities:
     64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
-    no socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
-    append, ACLs, xattrs, iconv, symtimes
+    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
+    append, ACLs, no xattrs, iconv, symtimes, prealloc

Então, eles adicionaram socketpairs e removeram xattrs . Outras páginas que li me levam a acreditar que tem a ver com xattrs , mas não estou totalmente convencido disso, e não sei como realmente testá-lo.

O final remoto é:

$ rsync --help | head -n 20
rsync  version 3.1.1  protocol version 31
Copyright (C) 1996-2014 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, symtimes, prealloc

Sugerindo ainda que xattrs seja a chave.

Olhando para os Conselhos de Segurança do Rsync , eles sugerem três coisas que parecem possivelmente relacionadas:

If you are using a version of rsync older than 3.1.3 as a client and receiving xattrs from an rsync server that you might not fully trust, a malicious (modified) server could send a non-null-terminated xattr name to overflow the xattr read buffer.

If you are running a writable rsync daemon older than 3.1.3, you should add a rule "refuse options = protect-args" if you don't fully trust the users who are sending you files.

If you're using a version of rsync older than 3.1.2 as a client and receiving files from an rsync server that you might not fully trust, this version adds extra checking to the file list to prevent the sender from tweaking the paths and/or the transfer requests in a way that could cause a file to be received outside the transfer destination.

Eu tentei algumas combinações de variáveis (por exemplo, -X ) para tentar remediar isso, mas não consigo encontrar nada para que a versão 3.1.3 funcione. Nesse ínterim, posso usar o 3.1.1 para fazer o que preciso fazer, mas o que mais posso verificar e / ou alterar na linha de comando para fazer as coisas funcionarem?

(win10_64, GfW-2.18.0, o remoto é o ubuntu-16.04 com o rsync-3.1.1)

    
por r2evans 13.08.2018 / 05:13

0 respostas

Tags