From a01caa268ff5c01d3eb062552f192f4da480a80f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 05 2019 20:21:31 +0000 Subject: import rsync-3.1.3-6.el8 --- diff --git a/SOURCES/rsync-3.0.6-iconv-logging.patch b/SOURCES/rsync-3.0.6-iconv-logging.patch new file mode 100644 index 0000000..bf7d943 --- /dev/null +++ b/SOURCES/rsync-3.0.6-iconv-logging.patch @@ -0,0 +1,22 @@ +diff --git a/log.c b/log.c +index 34a013b..1aca728 100644 +--- a/log.c ++++ b/log.c +@@ -377,10 +377,13 @@ output_msg: + filtered_fwrite(f, convbuf, outbuf.len, 0); + outbuf.len = 0; + } +- if (!ierrno || ierrno == E2BIG) +- continue; +- fprintf(f, "\\#%03o", CVAL(inbuf.buf, inbuf.pos++)); +- inbuf.len--; ++ /* Log one byte of illegal/incomplete sequence and continue with ++ * the next character. Check that the buffer is non-empty for the ++ * sake of robustness. */ ++ if ((ierrno == EILSEQ || ierrno == EINVAL) && inbuf.len) { ++ fprintf(f, "\\#%03o", CVAL(inbuf.buf, inbuf.pos++)); ++ inbuf.len--; ++ } + } + } else + #endif diff --git a/SOURCES/rsync-3.1.3-covscan.patch b/SOURCES/rsync-3.1.3-covscan.patch new file mode 100644 index 0000000..4e3b648 --- /dev/null +++ b/SOURCES/rsync-3.1.3-covscan.patch @@ -0,0 +1,57 @@ +diff --git a/util.c b/util.c +index fbbfd8ba..235afa82 100644 +--- a/util.c ++++ b/util.c +@@ -342,6 +342,7 @@ int copy_file(const char *source, const char *dest, int ofd, mode_t mode) + if (robust_unlink(dest) && errno != ENOENT) { + int save_errno = errno; + rsyserr(FERROR_XFER, errno, "unlink %s", full_fname(dest)); ++ close(ifd); + errno = save_errno; + return -1; + } +diff --git a/lib/pool_alloc.c b/lib/pool_alloc.c +index 5856d591..a70a3f1a 100644 +--- a/lib/pool_alloc.c ++++ b/lib/pool_alloc.c +@@ -49,15 +49,15 @@ pool_create(size_t size, size_t quantum, void (*bomb)(const char *), int flags) + { + struct alloc_pool *pool; + +- if (!(pool = new0(struct alloc_pool))) +- return NULL; +- + if ((MINALIGN & (MINALIGN - 1)) != 0) { + if (bomb) + (*bomb)("Compiler error: MINALIGN is not a power of 2\n"); + return NULL; + } + ++ if (!(pool = new0(struct alloc_pool))) ++ return NULL; ++ + if (!size) + size = POOL_DEF_EXTENT; + if (!quantum) +diff --git a/batch.c b/batch.c +index 21c632fc..1ab66e90 100644 +--- a/batch.c ++++ b/batch.c +@@ -216,7 +216,7 @@ static void write_filter_rules(int fd) + void write_batch_shell_file(int argc, char *argv[], int file_arg_cnt) + { + int fd, i, len, err = 0; +- char *p, filename[MAXPATHLEN]; ++ char *p, *p2, filename[MAXPATHLEN]; + + stringjoin(filename, sizeof filename, + batch_name, ".sh", NULL); +@@ -267,7 +267,7 @@ void write_batch_shell_file(int argc, char *argv[], int file_arg_cnt) + err = 1; + } + } +- if (!(p = check_for_hostspec(argv[argc - 1], &p, &i))) ++ if (!(p = check_for_hostspec(argv[argc - 1], &p2, &i))) + p = argv[argc - 1]; + if (write(fd, " ${1:-", 6) != 6 + || write_arg(fd, p) < 0) diff --git a/SPECS/rsync.spec b/SPECS/rsync.spec index 4a9968c..e246359 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: 4%{?dist} +Release: 6%{?dist} Group: Applications/Internet URL: http://rsync.samba.org/ @@ -28,6 +28,8 @@ Provides: bundled(zlib) = 1.2.8 License: GPLv3+ Patch0: rsync-man.patch +Patch1: rsync-3.0.6-iconv-logging.patch +Patch2: rsync-3.1.3-covscan.patch %description Rsync uses a reliable algorithm to bring remote and host files into @@ -66,6 +68,8 @@ patch -p1 -i patches/xattrs.diff patch -p1 -i patches/copy-devices.diff %patch0 -p1 -b .man +%patch1 -p1 -b .iconv +%patch2 -p1 -b .covscan %build @@ -113,6 +117,12 @@ chmod -x support/* %systemd_postun_with_restart rsyncd.service %changelog +* Tue Apr 16 2019 Michal Ruprich - 3.1.3-6 +- Resolves: #1602683 - Please review important issues found by covscan + +* Tue Apr 16 2019 Michal Ruprich - 3.1.3-5 +- Resolves: #1656761 - [FJ8.0 Bug]: [REG] The rsync command is terminated with SIGSEGV + * Wed Oct 03 2018 Michal Ruprich - 3.1.3-4 - Resolves: #1635631 - Remove --noatime option from rsync Cleaning spec file