Removes the permission-bit entries from the ACL because these * can be reconstructed from the file's mode. */
| 136 | /* Removes the permission-bit entries from the ACL because these |
| 137 | * can be reconstructed from the file's mode. */ |
| 138 | static void rsync_acl_strip_perms(stat_x *sxp) |
| 139 | { |
| 140 | rsync_acl *racl = sxp->acc_acl; |
| 141 | |
| 142 | racl->user_obj = NO_ENTRY; |
| 143 | if (racl->mask_obj == NO_ENTRY) |
| 144 | racl->group_obj = NO_ENTRY; |
| 145 | else { |
| 146 | int group_perms = (sxp->st.st_mode >> 3) & 7; |
| 147 | if (racl->group_obj == group_perms) |
| 148 | racl->group_obj = NO_ENTRY; |
| 149 | #ifndef HAVE_SOLARIS_ACLS |
| 150 | if (racl->names.count != 0 && racl->mask_obj == group_perms) |
| 151 | racl->mask_obj = NO_ENTRY; |
| 152 | #endif |
| 153 | } |
| 154 | racl->other_obj = NO_ENTRY; |
| 155 | } |
| 156 | |
| 157 | /* Given an empty rsync_acl, fake up the permission bits. */ |
| 158 | static void rsync_acl_fake_perms(rsync_acl *racl, mode_t mode) |