From: Wayne Davison Date: Sun, 11 Sep 2022 04:52:54 +0000 (-0700) Subject: Require a newer protocol to specify the digest list. X-Git-Tag: v3.2.7pre1~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a6a0d2f77c7d1f06829c301914585a3d873fcd39;p=thirdparty%2Frsync.git Require a newer protocol to specify the digest list. --- diff --git a/clientserver.c b/clientserver.c index 7436d01e..9ad7eaf7 100644 --- a/clientserver.c +++ b/clientserver.c @@ -184,11 +184,11 @@ static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int } if (remote_sub < 0) { - if (remote_protocol == 30) { + if (remote_protocol >= 30) { if (am_client) - rprintf(FERROR, "rsync: server is speaking an incompatible beta of protocol 30\n"); + rprintf(FERROR, "rsync: the server omitted the subprotocol value: %s\n", buf); else - io_printf(f_out, "@ERROR: your client is speaking an incompatible beta of protocol 30\n"); + io_printf(f_out, "@ERROR: your client omitted the subprotocol value: %s\n", buf); return -1; } remote_sub = 0; @@ -200,6 +200,12 @@ static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int daemon_auth_choices = strdup(daemon_auth_choices + 1); if ((cp = strchr(daemon_auth_choices, '\n')) != NULL) *cp = '\0'; + } else if (remote_protocol > 31) { + if (am_client) + rprintf(FERROR, "rsync: the server omitted the digest name list: %s\n", buf); + else + io_printf(f_out, "@ERROR: your client omitted the digest name list: %s\n", buf); + return -1; } if (protocol_version > remote_protocol) {