[rsync/f14] Fix unwritable directory issue
Michal Luščon
mluscon at fedoraproject.org
Mon Oct 31 13:56:21 UTC 2011
commit af707417c1dde95914f460fb9e83698b2a712710
Author: mluscon <mluscon at redhat.com>
Date: Wed Oct 26 15:43:30 2011 +0200
Fix unwritable directory issue
rsync-3.0.8-fix-unwritable-directory-issue.patch | 46 ++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
---
diff --git a/rsync-3.0.8-fix-unwritable-directory-issue.patch b/rsync-3.0.8-fix-unwritable-directory-issue.patch
new file mode 100644
index 0000000..519fa9c
--- /dev/null
+++ b/rsync-3.0.8-fix-unwritable-directory-issue.patch
@@ -0,0 +1,46 @@
+From ba35ba06c9964d67fd7712f1b103e6d527f30c46 Mon Sep 17 00:00:00 2001
+From: Wayne Davison <wayned at samba.org>
+Date: Mon, 30 May 2011 08:24:27 -0700
+Subject: [PATCH] Fix unwritable directory issue due to misordered chmod call.
+
+---
+ generator.c | 16 ++++++++--------
+ 1 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/generator.c b/generator.c
+index 4f74597..88a762a 100644
+--- a/generator.c
++++ b/generator.c
+@@ -1523,6 +1523,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+ }
+ }
+
++#ifdef SUPPORT_XATTRS
++ if (preserve_xattrs && statret == 1)
++ copy_xattrs(fnamecmpbuf, fname);
++#endif
++ if (set_file_attrs(fname, file, real_ret ? NULL : &real_sx, NULL, 0)
++ && verbose && code != FNONE && f_out != -1)
++ rprintf(code, "%s/\n", fname);
++
+ /* We need to ensure that the dirs in the transfer have writable
+ * permissions during the time we are putting files within them.
+ * This is then fixed after the transfer is done. */
+@@ -1538,14 +1546,6 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+ }
+ #endif
+
+-#ifdef SUPPORT_XATTRS
+- if (preserve_xattrs && statret == 1)
+- copy_xattrs(fnamecmpbuf, fname);
+-#endif
+- if (set_file_attrs(fname, file, real_ret ? NULL : &real_sx, NULL, 0)
+- && verbose && code != FNONE && f_out != -1)
+- rprintf(code, "%s/\n", fname);
+-
+ if (real_ret != 0 && one_file_system)
+ real_sx.st.st_dev = filesystem_dev;
+ if (inc_recurse) {
+--
+1.7.6.4
+
More information about the scm-commits
mailing list