Internal error: wrong write used in receiver.

Wayne Davison wayned at samba.org
Fri Nov 10 15:16:43 GMT 2006


On Fri, Nov 10, 2006 at 02:15:22PM +0100, Sven Strickroth wrote:
> [generator] make_file(home/administ,*,2)
> Internal error: wrong write used in receiver.

Looks like the ACLs patch didn't get tested with --delete + --acls.
Applying the attached patch will fix this.

..wayne..
-------------- next part --------------
--- old/flist.c
+++ new/flist.c
@@ -987,7 +987,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)
@@ -1003,12 +1003,12 @@
 		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
 	} else {
 #ifdef SUPPORT_ACLS
-		if (preserve_acls)
+		if (preserve_acls && f >= 0)
 			free_acl(&sx);
 #endif
 	}


More information about the rsync mailing list