X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/b5abdf474a67e7cad34f67feaaff2a69a08ec807..c4bd76ea96ca69010c8f4620381acc3d5b8f7cd8:/adaptec_acl_mods.diff diff --git a/adaptec_acl_mods.diff b/adaptec_acl_mods.diff index e36ed9d..f0325a3 100644 --- a/adaptec_acl_mods.diff +++ b/adaptec_acl_mods.diff @@ -1,8 +1,7 @@ -Depends-On-Patch: acls.diff - -After applying the above patch and this one, run these commands for a -successful build: +To use this patch, run these commands for a successful build: + patch -p1 users.idas, count = racl->users.count; count--; ida++) { COE( sys_acl_create_entry,(smb_acl, &entry) ); -@@ -463,7 +472,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_ +@@ -444,7 +453,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) ); @@ -72,45 +71,54 @@ entry. for (ida = racl->groups.idas, count = racl->groups.count; count--; ida++) { COE( sys_acl_create_entry,(smb_acl, &entry) ); -@@ -473,7 +482,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_ +@@ -454,7 +463,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_ } #ifdef ACLS_NEED_MASK -- mask_bits = racl->mask == NO_ENTRY ? racl->group_obj & 7 : racl->mask; -+ mask_bits = racl->mask == NO_ENTRY ? racl->group_obj & 077 : racl->mask; +- mask_bits = racl->mask_obj == NO_ENTRY ? racl->group_obj & 7 : racl->mask_obj; ++ mask_bits = racl->mask_obj == NO_ENTRY ? racl->group_obj & 077 : racl->mask_obj; 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) ); -@@ -487,7 +496,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_ +@@ -468,7 +477,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) ); -- COE2( store_access_in_entry,(racl->other & 7, entry) ); -+ COE2( store_access_in_entry,(racl->other & 077, entry) ); +- COE2( store_access_in_entry,(racl->other_obj & 7, entry) ); ++ COE2( store_access_in_entry,(racl->other_obj & 077, entry) ); #ifdef DEBUG if (sys_acl_valid(*smb_acl) < 0) -@@ -721,7 +730,7 @@ static void receive_rsync_acl(rsync_acl +@@ -765,7 +774,7 @@ static void old_recv_rsync_acl(rsync_acl while (count--) { char tag = read_byte(f); uchar access = read_byte(f); - if (access & ~ (4 | 2 | 1)) { + if (access & ~(32 | 16 | 8 | 4 | 2 | 1)) { - rprintf(FERROR, "receive_rsync_acl: bogus permset %o\n", + rprintf(FERROR, "old_recv_rsync_acl: bogus permset %o\n", access); exit_cleanup(RERR_STREAMIO); -@@ -797,7 +806,7 @@ static void receive_rsync_acl(rsync_acl - racl->mask = NO_ENTRY; +@@ -831,7 +840,7 @@ static void old_recv_rsync_acl(rsync_acl + racl->mask_obj = NO_ENTRY; } - } else if (racl->mask == NO_ENTRY) /* Must be non-empty with lists. */ -- racl->mask = computed_mask_bits | (racl->group_obj & 7); -+ racl->mask = computed_mask_bits | (racl->group_obj & 077); + } else if (racl->mask_obj == NO_ENTRY) /* Must be non-empty with lists. */ +- racl->mask_obj = computed_mask_bits | (racl->group_obj & 7); ++ racl->mask_obj = computed_mask_bits | (racl->group_obj & 077); } /* Receive the ACL info the sender has included for this file-list entry. */ ---- old/smb_acls.h -+++ new/smb_acls.h -@@ -33,6 +33,11 @@ +@@ -903,7 +912,7 @@ static uchar recv_acl_access(uchar *name + *name_follows_val = 0; + } + +- if (access & ~(4 | 2 | 1)) { ++ if (access & ~(32 | 16 | 8 | 4 | 2 | 1)) { + rprintf(FERROR, "recv_acl_access: bogus permset %o\n", access); + exit_cleanup(RERR_STREAMIO); + } +--- old/lib/sysacls.h ++++ new/lib/sysacls.h +@@ -45,6 +45,11 @@ #define SMB_ACL_READ ACL_READ #define SMB_ACL_WRITE ACL_WRITE #define SMB_ACL_EXECUTE ACL_EXECUTE