Bugfix for acl/xattrs patches problem

This commit is contained in:
ssorce 2007-02-19 15:16:01 +00:00
parent 965cc4dcf2
commit 85f0ea326a
2 changed files with 51 additions and 1 deletions

View File

@ -0,0 +1,45 @@
--- rsync-2.6.9/flist.c 2007-02-18 19:25:08.000000000 -0500
+++ rsync-2.6.9.fix/flist.c 2007-02-18 19:24:38.000000000 -0500
@@ -998,7 +998,7 @@
file->mode = tweak_mode(file->mode, chmod_modes);
#ifdef SUPPORT_ACLS
- if (preserve_acls) {
+ if (preserve_acls && f >= 0) {
sx.st.st_mode = file->mode;
sx.acc_acl = sx.def_acl = NULL;
if (get_acl(fname, &sx) < 0)
@@ -1006,7 +1006,7 @@
}
#endif
#ifdef SUPPORT_XATTRS
- if (preserve_xattrs) {
+ if (preserve_xattrs && f >= 0) {
sx.xattr = NULL;
if (get_xattr(fname, &sx) < 0)
return NULL;
@@ -1021,20 +1021,20 @@
flist->files[flist->count++] = file;
send_file_entry(file, f);
#ifdef SUPPORT_ACLS
- if (preserve_acls)
+ if (preserve_acls && f >= 0)
send_acl(&sx, f);
#endif
#ifdef SUPPORT_XATTRS
- if (preserve_xattrs)
+ if (preserve_xattrs && f >= 0)
send_xattr(&sx, f);
#endif
} else {
#ifdef SUPPORT_ACLS
- if (preserve_acls)
+ if (preserve_acls && f >= 0)
free_acl(&sx);
#endif
#ifdef SUPPORT_XATTRS
- if (preserve_xattrs)
+ if (preserve_xattrs && f >= 0)
free_xattr(&sx);
#endif
}

View File

@ -1,12 +1,13 @@
Summary: A program for synchronizing files over a network.
Name: rsync
Version: 2.6.9
Release: 1
Release: 2
Group: Applications/Internet
# TAG: for pre versions use
#Source: ftp://rsync.samba.org/pub/rsync/rsync-%{version}pre1.tar.gz
Source: ftp://rsync.samba.org/pub/rsync/rsync-%{version}.tar.gz
Source1: rsync.xinetd
Patch1: rsync-2.6.9-acl-xattr-delete-bug.patch
BuildRequires: libacl-devel, libattr-devel, autoconf, make, gcc
Prefix: %{_prefix}
BuildRoot: /var/tmp/%{name}-root
@ -27,6 +28,7 @@ package.
%setup -q
patch -p1 < patches/acls.diff
patch -p1 < patches/xattrs.diff
%patch1 -p1 -b .acl_xattrs_bug
%build
rm -fr autom4te.cache
@ -56,6 +58,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man5/rsyncd.conf.5*
%changelog
* Mon Feb 19 2007 Simo Sorce <ssorce@redhat.com> - 2.6.9-2
- fix acl/xattr bug with --delete: (bz#229145)
* Wed Nov 22 2006 Florian La Roche <laroche@redhat.com> - 2.6.9-1
- update to 2.6.9