test failed with acl patch

Wayne Davison wayned at samba.org
Fri Jul 29 02:34:42 GMT 2005


On Fri, Jul 29, 2005 at 01:57:05AM +0200, Olivier Thauvin wrote:
> I am trying to update our rpm to rsync 2.6.6 but one of the test
> failed with this patch.

This revealed that the acls patch was not properly reporting what files
were being updated when acls were not being preserved.  The attached
patch should fix this.

..wayne..
-------------- next part --------------
--- orig/acls.c	2005-07-28 19:28:30.093411321 -0700
+++ acls.c	2005-07-28 19:29:21.584004524 -0700
@@ -845,7 +845,7 @@ int dup_acl(const char *orig, const char
 		types[] = {SMB_ACL_TYPE_ACCESS, SMB_ACL_TYPE_DEFAULT};
 	int ret = 0;
 	if (!preserve_acls)
-		return 0;
+		return 1;
 	for (type = &types[0];
 	     type < &types[0] + sizeof types / sizeof types[0]
 		 && (*type == SMB_ACL_TYPE_ACCESS || S_ISDIR(mode));
@@ -962,7 +962,7 @@ static int set_keep_backup_acl()
 		}
 		return ret;
 	}
-	return 0;
+	return 1;
 }
 
 void cleanup_keep_backup_acl()
@@ -992,7 +992,7 @@ int set_acl(const char *fname, const str
 	SMB_ACL_TYPE_T *type,
 		types[] = {SMB_ACL_TYPE_ACCESS, SMB_ACL_TYPE_DEFAULT};
 	if (dry_run || !preserve_acls || S_ISLNK(file->mode))
-		return 0;
+		return 1;
 	if (file == backup_orig_file) {
 		if (!strcmp(fname, backup_dest_fname))
 			return set_keep_backup_acl();
--- orig/rsync.h	2005-07-28 19:28:30.127408412 -0700
+++ rsync.h	2005-07-28 19:25:54.816695615 -0700
@@ -667,12 +667,12 @@ struct stats {
 #define SEND_ACL(file, f)
 #define RECEIVE_ACL(file, f)
 #define SORT_FILE_ACL_INDEX_LISTS()
-#define SET_ACL(fname, file)			0 /* checked return value */
+#define SET_ACL(fname, file)			1 /* checked return value */
 #define NEXT_ACL_UID()	
 #define ACL_UID_MAP(uid)
 #define PUSH_KEEP_BACKUP_ACL(file, orig, dest)
 #define CLEANUP_KEEP_BACKUP_ACL()
-#define DUP_ACL(src, orig, mode)		0 /* checked return value */
+#define DUP_ACL(src, orig, mode)		1 /* checked return value */
 #endif /* SUPPORT_ACLS */
 #include "smb_acls.h"
 


More information about the rsync mailing list