MCPcopy Create free account
hub / github.com/RsyncProject/rsync / rsync_acl_strip_perms

Function rsync_acl_strip_perms

acls.c:138–155  ·  view source on GitHub ↗

Removes the permission-bit entries from the ACL because these * can be reconstructed from the file's mode. */

Source from the content-addressed store, hash-verified

136/* Removes the permission-bit entries from the ACL because these
137 * can be reconstructed from the file's mode. */
138static 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. */
158static void rsync_acl_fake_perms(rsync_acl *racl, mode_t mode)

Callers 1

send_aclFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected