Send the ACL from the stat_x structure down the indicated file descriptor. * This also frees the ACL data. */
| 649 | /* Send the ACL from the stat_x structure down the indicated file descriptor. |
| 650 | * This also frees the ACL data. */ |
| 651 | void 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 |
no test coverage detected