From e7be5025dc4ed6d41a587d36df4584e134300112 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 09 2020 14:12:40 +0000 Subject: import rsync-3.1.3-11.el8 --- diff --git a/SOURCES/rsync-3.1.3-append-check.patch b/SOURCES/rsync-3.1.3-append-check.patch new file mode 100644 index 0000000..62fd792 --- /dev/null +++ b/SOURCES/rsync-3.1.3-append-check.patch @@ -0,0 +1,44 @@ +commit bd17c2a4e237ca1f38544db65053ecfea6054009 +Author: Tomas Korbar +Date: Thu Sep 24 13:17:45 2020 +0200 + + Skip files for transfer that has been truncated during negotiation + +diff --git a/rsync.1 b/rsync.1 +index 6cabd44..855dd47 100644 +--- a/rsync.1 ++++ b/rsync.1 +@@ -1004,8 +1004,10 @@ This causes rsync to update a file by appending data onto + the end of the file, which presumes that the data that already exists on + the receiving side is identical with the start of the file on the sending + side. If a file needs to be transferred and its size on the receiver is +-the same or longer than the size on the sender, the file is skipped. This +-does not interfere with the updating of a file\(cq\&s non\-content attributes ++the same or longer than the size on the sender, the file is skipped. It ++also skips any files whose size on the sending side gets shorter during ++the send negotiations (rsync warns about a "diminished" file when this ++happens). This does not interfere with the updating of a file\(cq\&s non\-content attributes + (e.g. permissions, ownership, etc.) when the file does not need to be + transferred, nor does it affect the updating of any non\-regular files. + Implies \fB\-\-inplace\fP. +diff --git a/sender.c b/sender.c +index 1cc28a1..e22eadd 100644 +--- a/sender.c ++++ b/sender.c +@@ -379,6 +379,16 @@ void send_files(int f_in, int f_out) + } + } + ++ if (append_mode > 0 && st.st_size < F_LENGTH(file)) { ++ rprintf(FWARNING, "skipped diminished file: %s\n", ++ full_fname(fname)); ++ free_sums(s); ++ close(fd); ++ if (protocol_version >= 30) ++ send_msg_int(MSG_NO_SEND, ndx); ++ continue; ++ } ++ + if (st.st_size) { + int32 read_size = MAX(s->blength * 3, MAX_MAP_SIZE); + mbuf = map_file(fd, st.st_size, read_size, s->blength); diff --git a/SOURCES/rsync-3.1.3-ignore-missing.patch b/SOURCES/rsync-3.1.3-ignore-missing.patch new file mode 100644 index 0000000..802cba8 --- /dev/null +++ b/SOURCES/rsync-3.1.3-ignore-missing.patch @@ -0,0 +1,49 @@ +commit af6118d98b3482cbcfc223bf2a0777bc19eccb02 +Author: Wayne Davison +Date: Sun Apr 26 18:02:17 2020 -0700 + + Allow a missing parent dir when --delete-missing-args was specified. + +diff --git a/generator.c b/generator.c +index 3c50f63f..b90c7ccd 100644 +--- a/generator.c ++++ b/generator.c +@@ -1277,10 +1277,16 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, + && (*dn != '.' || dn[1]) /* Avoid an issue with --relative and the "." dir. */ + && (!prior_dir_file || strcmp(dn, f_name(prior_dir_file, NULL)) != 0) + && flist_find_name(cur_flist, dn, 1) < 0) { +- rprintf(FERROR, +- "ABORTING due to invalid path from sender: %s/%s\n", +- dn, file->basename); +- exit_cleanup(RERR_PROTOCOL); ++ /* The --delete-missing-args option can actually put invalid entries into ++ * the file list, so if that option was specified, we'll just complain about ++ * it and allow it. */ ++ if (missing_args == 2 && file->mode == 0) ++ rprintf(FERROR, "WARNING: parent dir is absent in the file list: %s\n", dn); ++ else { ++ rprintf(FERROR, "ABORTING due to invalid path from sender: %s/%s\n", ++ dn, file->basename); ++ exit_cleanup(RERR_PROTOCOL); ++ } + } + if (relative_paths && !implied_dirs + && do_stat(dn, &sx.st) < 0) { +@@ -1383,7 +1389,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, + added_perms = 0; + if (is_dir < 0) { + if (!(preserve_times & PRESERVE_DIR_TIMES)) +- return; ++ goto cleanup; + /* In inc_recurse mode we want to make sure any missing + * directories get created while we're still processing + * the parent dir (which allows us to touch the parent +@@ -1525,7 +1531,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, + "ignoring unsafe symlink \"%s\" -> \"%s\"\n", + fname, sl); + } +- return; ++ goto cleanup; + } + if (statret == 0) { + char lnk[MAXPATHLEN]; diff --git a/SPECS/rsync.spec b/SPECS/rsync.spec index e63923f..ad6329d 100644 --- a/SPECS/rsync.spec +++ b/SPECS/rsync.spec @@ -9,7 +9,7 @@ Summary: A program for synchronizing files over a network Name: rsync Version: 3.1.3 -Release: 9%{?dist} +Release: 11%{?dist} Group: Applications/Internet URL: http://rsync.samba.org/ @@ -32,6 +32,8 @@ Patch1: rsync-3.0.6-iconv-logging.patch Patch2: rsync-3.1.3-covscan.patch Patch3: rsync-3.1.2-remove-symlinks.patch Patch4: rsync-3.1.2-vvv-hang.patch +Patch5: rsync-3.1.3-ignore-missing.patch +Patch6: rsync-3.1.3-append-check.patch %description Rsync uses a reliable algorithm to bring remote and host files into @@ -74,9 +76,10 @@ patch -p1 -i patches/copy-devices.diff %patch2 -p1 -b .covscan %patch3 -p1 -b .symlinks %patch4 -p1 -b .vvv +%patch5 -p1 -b .missing +%patch6 -p1 -b .append %build - %configure # --with-included-zlib=no temporary disabled because of #1043965 @@ -121,6 +124,12 @@ chmod -x support/* %systemd_postun_with_restart rsyncd.service %changelog +* Thu Nov 05 2020 Tomas Korbar - 3.1.3-11 +- Resolves: #1855981 - rsync segfaults in --append mode + +* Thu Nov 05 2020 Tomas Korbar - 3.1.3-10 +- Resolves: #1727093 - rsync: "ABORTING due to invalid path from sender" + * Mon Aug 24 2020 Michal Ruprich - 3.1.3-9 - Resolves: #1667436 - rsyncd.service fails to start at boot if address is configured