diff --git a/rsync-3.1.1-xattr.patch b/rsync-3.1.1-xattr.patch new file mode 100644 index 0000000..88766db --- /dev/null +++ b/rsync-3.1.1-xattr.patch @@ -0,0 +1,48 @@ +--- rsync/generator.c ++++ rsync/generator.c +@@ -551,9 +551,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre + #ifdef SUPPORT_XATTRS + if (preserve_xattrs && do_xfers + && iflags & (ITEM_REPORT_XATTR|ITEM_TRANSFER)) { +- int fd = iflags & ITEM_REPORT_XATTR +- && (protocol_version < 31 || !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE)) +- ? sock_f_out : -1; ++ int fd = iflags & ITEM_REPORT_XATTR ? sock_f_out : -1; + send_xattr_request(NULL, file, fd); + } + #endif + +--- rsync/receiver.c ++++ rsync/receiver.c +@@ -580,16 +580,14 @@ int recv_files(int f_in, int f_out, char *local_name) + rprintf(FINFO, "recv_files(%s)\n", fname); + + #ifdef SUPPORT_XATTRS +- if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers +- && (protocol_version < 31 || !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE))) ++ if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers) + recv_xattr_request(file, f_in); + #endif + + if (!(iflags & ITEM_TRANSFER)) { + maybe_log_item(file, iflags, itemizing, xname); + #ifdef SUPPORT_XATTRS +- if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers +- && !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE)) ++ if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers) + set_file_attrs(fname, file, NULL, fname, 0); + #endif + if (iflags & ITEM_IS_NEW) { + +--- rsync/sender.c ++++ rsync/sender.c +@@ -177,8 +177,7 @@ static void write_ndx_and_attrs(int f_out, int ndx, int iflags, + if (iflags & ITEM_XNAME_FOLLOWS) + write_vstring(f_out, buf, len); + #ifdef SUPPORT_XATTRS +- if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers +- && (protocol_version < 31 || !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE))) ++ if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers) + send_xattr_request(fname, file, f_out); + #endif + } diff --git a/rsync.spec b/rsync.spec index 1422f3d..c72760b 100644 --- a/rsync.spec +++ b/rsync.spec @@ -1,3 +1,5 @@ +%global _hardened_build 1 + %define isprerelease 0 %if %isprerelease @@ -7,7 +9,7 @@ Summary: A program for synchronizing files over a network Name: rsync Version: 3.1.0 -Release: 3%{?prerelease}%{?dist} +Release: 4%{?prerelease}%{?dist} Group: Applications/Internet URL: http://rsync.samba.org/ @@ -28,6 +30,7 @@ License: GPLv3+ Patch0: rsync-man.patch Patch1: rsync-3.1.1-dos.patch +Patch2: rsync-3.1.1-xattr.patch %description Rsync uses a reliable algorithm to bring remote and host files into @@ -60,6 +63,7 @@ patch -p1 -i patches/copy-devices.diff %patch0 -p1 -b .man %patch1 -p1 -b .dos +%patch2 -p1 -b .xattr %build @@ -103,6 +107,9 @@ rm -rf $RPM_BUILD_ROOT %systemd_postun_with_restart rsyncd.service %changelog +* Mon May 26 2014 Michal Luscon - 3.1.0-4 +- Fixed: #1050081 undo the hard-link xattr optimization + * Wed Apr 16 2014 Michal Luscon - 3.1.0-3 - Fixed: CVE-2014-2855 - denial of service - Reverted: compilation with system provided zlib