X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/00188d68fd6237a24a4f71c26a3251b1951fa542..dd0d95fa9c8eea3de9cc95fc27a6d1f4f051439c:/adaptec_acl_mods.diff diff --git a/adaptec_acl_mods.diff b/adaptec_acl_mods.diff index f9988e7..be90781 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 user_obj & 7, entry) ); ++ COE2( store_access_in_entry,(racl->user_obj & 077, entry) ); - static void receive_rsync_acl(rsync_acl *racl, int f) - { -- uchar computed_mask_bits = 0; -+ abits computed_mask_bits = 0; - ida_list *idal = NULL; - id_access *ida; - size_t count; -@@ -708,8 +719,8 @@ static void receive_rsync_acl(rsync_acl + for (ida = racl->users.idas, count = racl->users.count; count--; ida++) { + COE( sys_acl_create_entry,(smb_acl, &entry) ); +@@ -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) ); +- COE2( store_access_in_entry,(racl->group_obj & 7, entry) ); ++ COE2( store_access_in_entry,(racl->group_obj & 077, entry) ); + + for (ida = racl->groups.idas, count = racl->groups.count; count--; ida++) { + COE( sys_acl_create_entry,(smb_acl, &entry) ); +@@ -429,7 +438,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; + 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) ); +@@ -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) ); +- COE2( store_access_in_entry,(racl->other & 7, entry) ); ++ COE2( store_access_in_entry,(racl->other & 077, entry) ); + + #ifdef DEBUG + if (sys_acl_valid(*smb_acl) < 0) +@@ -646,7 +655,7 @@ static void receive_rsync_acl(rsync_acl while (count--) { char tag = read_byte(f); -- uchar access = read_byte(f); + uchar access = read_byte(f); - if (access & ~ (4 | 2 | 1)) { -+ abits access = read_byte(f); + if (access & ~(32 | 16 | 8 | 4 | 2 | 1)) { rprintf(FERROR, "receive_rsync_acl: bogus permset %o\n", access); exit_cleanup(RERR_STREAMIO); +@@ -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. */ +- racl->mask = computed_mask_bits | (racl->group_obj & 7); ++ racl->mask = 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 @@