On 10/21/06, Wayne Davison <[EMAIL PROTECTED]> wrote:
On Sat, Oct 21, 2006 at 04:27:17PM -0400, Matt McCutchen wrote:
> if (preserve_acls && real_ret == 0)
> get_acl(fname, &real_sx);
That should be checking fnamecmp, not fname. I've just commited a fix
for patches/acls.diff.
I still get the error message. There were two occurrences of
"get_acl(fname, &real_sx)" in generator.c, and you fixed only the one
that was not producing the error in my scenario. The other one needs
to be fixed too.
Moreover, not only do I get the error message, the sender complains
that the connection closed unexpectedly. In fact, the generator
crashed on the "free_acl(sxp);" call at line 521 of acls.c because it
tried to free the uninitialized pointers racl->users and racl->groups.
To fix this, don't store racl into sxp until after racl has been
filled (or get_acl has returned failure). I bet Checker would have
caught this mistake if the build farm ran it on the ACL version of
rsync.
Attached is a metapatch to acls.diff that fixes the second get_acl
call and fixes the crash in get_acl. However, I still don't
understand why a basis file found in a basis dir should cause real_ret
to be set to zero while a fuzzy basis file shouldn't.
Matt
### Eclipse Workspace Patch 1.0
#P rsync
Index: patches/acls.diff
===================================================================
RCS file: /cvsroot/rsync/patches/acls.diff,v
retrieving revision 1.151
diff -u -r1.151 acls.diff
--- patches/acls.diff 21 Oct 2006 21:00:47 -0000 1.151
+++ patches/acls.diff 21 Oct 2006 23:37:57 -0000
@@ -30,7 +30,7 @@
popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
--- old/acls.c
+++ new/acls.c
-@@ -0,0 +1,1093 @@
+@@ -0,0 +1,1094 @@
+/*
+ * Handle passing Access Control Lists between systems.
+ *
@@ -534,10 +534,6 @@
+
+ if (!racl)
+ out_of_memory("get_acl");
-+ if (type == SMB_ACL_TYPE_ACCESS)
-+ sxp->acc_acl = racl;
-+ else
-+ sxp->def_acl = racl;
+
+ if (sacl) {
+ BOOL ok = unpack_smb_acl(racl, sacl);
@@ -558,6 +554,11 @@
+ free_acl(sxp);
+ return -1;
+ }
++
++ if (type == SMB_ACL_TYPE_ACCESS)
++ sxp->acc_acl = racl;
++ else
++ sxp->def_acl = racl;
+ } while (BUMP_TYPE(type) && S_ISDIR(sxp->st.st_mode));
+
+ return 0;
@@ -2050,7 +2051,7 @@
- itemize(file, -1, real_ret, &real_st, iflags, fnamecmp_type,
+#ifdef SUPPORT_ACLS
+ if (preserve_acls && real_ret == 0)
-+ get_acl(fname, &real_sx);
++ get_acl(fnamecmp, &real_sx);
+#endif
+ itemize(file, -1, real_ret, &real_sx, iflags, fnamecmp_type,
fuzzy_file ? fuzzy_file->basename : NULL);
--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html