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

Function send_ida_entries

acls.c:581–605  ·  view source on GitHub ↗

Send the ida list over the file descriptor. */

Source from the content-addressed store, hash-verified

579
580/* Send the ida list over the file descriptor. */
581static void send_ida_entries(int f, const ida_entries *idal)
582{
583 id_access *ida;
584 size_t count = idal->count;
585
586 write_varint(f, idal->count);
587
588 for (ida = idal->idas; count--; ida++) {
589 uint32 xbits = ida->access << 2;
590 const char *name;
591 if (ida->access & NAME_IS_USER) {
592 xbits |= XFLAG_NAME_IS_USER;
593 name = numeric_ids ? NULL : add_uid(ida->id);
594 } else
595 name = numeric_ids ? NULL : add_gid(ida->id);
596 write_varint(f, ida->id);
597 if (inc_recurse && name) {
598 int len = strlen(name);
599 write_varint(f, xbits | XFLAG_NAME_FOLLOWS);
600 write_byte(f, len);
601 write_buf(f, name, len);
602 } else
603 write_varint(f, xbits);
604 }
605}
606
607static void send_rsync_acl(int f, rsync_acl *racl, SMB_ACL_TYPE_T type,
608 item_list *racl_list)

Callers 1

send_rsync_aclFunction · 0.85

Calls 5

write_varintFunction · 0.85
add_uidFunction · 0.85
add_gidFunction · 0.85
write_byteFunction · 0.85
write_bufFunction · 0.85

Tested by

no test coverage detected