When deleting extraneous xattrs, never delete items from the system
[rsync/rsync-patches.git] / adaptec_acl_mods.diff
index 21ccc9f..be90781 100644 (file)
@@ -30,7 +30,7 @@ entry.
 
 --- old/acls.c
 +++ new/acls.c
-@@ -282,6 +282,9 @@ static BOOL unpack_smb_acl(rsync_acl *ra
+@@ -281,6 +281,9 @@ static BOOL unpack_smb_acl(rsync_acl *ra
                }
                access = (sys_acl_get_perm(permset, SMB_ACL_READ) ? 4 : 0)
                       | (sys_acl_get_perm(permset, SMB_ACL_WRITE) ? 2 : 0)
@@ -40,7 +40,7 @@ entry.
                       | (sys_acl_get_perm(permset, SMB_ACL_EXECUTE) ? 1 : 0);
                /* continue == done with entry; break == store in temporary ida list */
                switch (tag_type) {
-@@ -376,6 +379,12 @@ static int store_access_in_entry(uchar a
+@@ -375,6 +378,12 @@ static int store_access_in_entry(uchar a
  
        COE( sys_acl_get_permset,(entry, &permset) );
        COE( sys_acl_clear_perms,(permset) );
@@ -53,7 +53,7 @@ entry.
        if (access & 4)
                COE( sys_acl_add_perm,(permset, SMB_ACL_READ) );
        if (access & 2)
-@@ -409,7 +418,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
+@@ -408,7 +417,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
  
        COE( sys_acl_create_entry,(smb_acl, &entry) );
        COE( sys_acl_set_tag_type,(entry, SMB_ACL_USER_OBJ) );
@@ -62,7 +62,7 @@ entry.
  
        for (ida = racl->users.idas, count = racl->users.count; count--; ida++) {
                COE( sys_acl_create_entry,(smb_acl, &entry) );
-@@ -420,7 +429,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
+@@ -419,7 +428,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
  
        COE( sys_acl_create_entry,(smb_acl, &entry) );
        COE( sys_acl_set_tag_type,(entry, SMB_ACL_GROUP_OBJ) );
@@ -71,7 +71,7 @@ entry.
  
        for (ida = racl->groups.idas, count = racl->groups.count; count--; ida++) {
                COE( sys_acl_create_entry,(smb_acl, &entry) );
-@@ -430,7 +439,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
+@@ -429,7 +438,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
        }
  
  #ifdef ACLS_NEED_MASK
@@ -80,7 +80,7 @@ entry.
        COE( sys_acl_create_entry,(smb_acl, &entry) );
        COE( sys_acl_set_tag_type,(entry, SMB_ACL_MASK) );
        COE2( store_access_in_entry,(mask_bits, entry) );
-@@ -444,7 +453,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
+@@ -443,7 +452,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
  
        COE( sys_acl_create_entry,(smb_acl, &entry) );
        COE( sys_acl_set_tag_type,(entry, SMB_ACL_OTHER) );
@@ -89,7 +89,7 @@ entry.
  
  #ifdef DEBUG
        if (sys_acl_valid(*smb_acl) < 0)
-@@ -649,7 +658,7 @@ static void receive_rsync_acl(rsync_acl 
+@@ -646,7 +655,7 @@ static void receive_rsync_acl(rsync_acl 
        while (count--) {
                char tag = read_byte(f);
                uchar access = read_byte(f);
@@ -98,7 +98,7 @@ entry.
                        rprintf(FERROR, "receive_rsync_acl: bogus permset %o\n",
                                access);
                        exit_cleanup(RERR_STREAMIO);
-@@ -725,7 +734,7 @@ static void receive_rsync_acl(rsync_acl 
+@@ -722,7 +731,7 @@ static void receive_rsync_acl(rsync_acl 
                        racl->mask = NO_ENTRY;
                }
        } else if (racl->mask == NO_ENTRY) /* Must be non-empty with lists. */