MCPcopy Index your code
hub / github.com/RsyncProject/rsync / send_acl

Function send_acl

acls.c:651–668  ·  view source on GitHub ↗

Send the ACL from the stat_x structure down the indicated file descriptor. * This also frees the ACL data. */

Source from the content-addressed store, hash-verified

649/* Send the ACL from the stat_x structure down the indicated file descriptor.
650 * This also frees the ACL data. */
651void send_acl(int f, stat_x *sxp)
652{
653 if (!sxp->acc_acl) {
654 sxp->acc_acl = create_racl();
655 rsync_acl_fake_perms(sxp->acc_acl, sxp->st.st_mode);
656 }
657 /* Avoid sending values that can be inferred from other data. */
658 rsync_acl_strip_perms(sxp);
659
660 send_rsync_acl(f, sxp->acc_acl, SMB_ACL_TYPE_ACCESS, &access_acl_list);
661
662 if (S_ISDIR(sxp->st.st_mode)) {
663 if (!sxp->def_acl)
664 sxp->def_acl = create_racl();
665
666 send_rsync_acl(f, sxp->def_acl, SMB_ACL_TYPE_DEFAULT, &default_acl_list);
667 }
668}
669
670/* === Receive functions === */
671

Callers 1

send_file_nameFunction · 0.85

Calls 4

create_raclFunction · 0.85
rsync_acl_fake_permsFunction · 0.85
rsync_acl_strip_permsFunction · 0.85
send_rsync_aclFunction · 0.85

Tested by

no test coverage detected