From 3ef0041303f7eeb661d614713491ef96fa5f758e Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 02 2022 20:14:17 +0000 Subject: import rsync-3.1.3-16.el8 --- diff --git a/SOURCES/rsync-3.1.3-xattr.patch b/SOURCES/rsync-3.1.3-xattr.patch new file mode 100644 index 0000000..91b77c2 --- /dev/null +++ b/SOURCES/rsync-3.1.3-xattr.patch @@ -0,0 +1,38 @@ +diff --git a/xattrs.c b/xattrs.c +index 508649c0..3c549192 100644 +--- a/xattrs.c ++++ b/xattrs.c +@@ -1055,7 +1055,7 @@ int set_xattr(const char *fname, const struct file_struct *file, const char *fna + { + rsync_xa_list *glst = rsync_xal_l.items; + item_list *lst; +- int ndx; ++ int ndx, added_write_perm = 0; + + if (dry_run) + return 1; /* FIXME: --dry-run needs to compute this value */ +@@ -1084,10 +1084,23 @@ int set_xattr(const char *fname, const struct file_struct *file, const char *fna + } + #endif + ++ /* If the target file lacks write permission, we try to add it ++ * temporarily so we can change the extended attributes. */ ++ if (!am_root ++#ifdef SUPPORT_LINKS ++ && !S_ISLNK(sxp->st.st_mode) ++#endif ++ && access(fname, W_OK) < 0 ++ && do_chmod(fname, (sxp->st.st_mode & CHMOD_BITS) | S_IWUSR) == 0) ++ added_write_perm = 1; ++ + ndx = F_XATTR(file); + glst += ndx; + lst = &glst->xa_items; +- return rsync_xal_set(fname, lst, fnamecmp, sxp); ++ int return_value = rsync_xal_set(fname, lst, fnamecmp, sxp); ++ if (added_write_perm) /* remove the temporary write permission */ ++ do_chmod(fname, sxp->st.st_mode); ++ return return_value; + } + + #ifdef SUPPORT_ACLS diff --git a/SPECS/rsync.spec b/SPECS/rsync.spec index 033e74a..effab71 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: 12%{?dist}.1 +Release: 16%{?dist} Group: Applications/Internet URL: http://rsync.samba.org/ @@ -35,7 +35,8 @@ Patch4: rsync-3.1.2-vvv-hang.patch Patch5: rsync-3.1.3-ignore-missing.patch Patch6: rsync-3.1.3-append-check.patch Patch7: rsync-3.1.3-skip-compress.patch -Patch8: rsync-3.1.3-cve-2018-25032.patch +Patch8: rsync-3.1.3-xattr.patch +Patch9: rsync-3.1.3-cve-2018-25032.patch %description Rsync uses a reliable algorithm to bring remote and host files into @@ -73,6 +74,9 @@ patch -p1 -i patches/xattrs.diff #Enable --copy-devices parameter patch -p1 -i patches/copy-devices.diff +#Enable --sparse-block option +patch -p1 -i patches/sparse-block.diff + %patch0 -p1 -b .man %patch1 -p1 -b .iconv %patch2 -p1 -b .covscan @@ -81,7 +85,8 @@ patch -p1 -i patches/copy-devices.diff %patch5 -p1 -b .missing %patch6 -p1 -b .append %patch7 -p1 -b .skip-compress -%patch8 -p1 -b .cve-2018-25032 +%patch8 -p1 -b .xattr +%patch9 -p1 -b .cve-2018-25032 %build %configure @@ -128,8 +133,17 @@ chmod -x support/* %systemd_postun_with_restart rsyncd.service %changelog -* Tue Apr 12 2022 Michal Ruprich - 3.1.3-12.1 -- Resolves: #2071512 - A flaw in zlib-1.2.11 when compressing (not decompressing!) certain inputs +* Thu Jul 28 2022 Michal Ruprich - 3.1.3-16 +- Resolves: #2043753 - [RFE] Improve defaults for sparse file buffering + +* Tue Apr 12 2022 Michal Ruprich - 3.1.3-15 +- Resolves: #2071513 - A flaw in zlib-1.2.11 when compressing (not decompressing!) certain inputs + +* Mon Oct 11 2021 Michal Ruprich - 3.1.3-14 +- Related: #1907443 - Adding fmf plans to run tests with tmt + +* Mon Sep 27 2021 Tomas Korbar - 3.1.3-13 +- Resolves: #1907443 - Read-only files that have changed xattrs fail to allow xattr changes * Fri Dec 18 2020 Michal Ruprich - 3.1.3-12 - Resolves: #1816528 - Defaults for --skip-compress are not working, everything is being compressed