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

Function recv_ida_entries

acls.c:697–729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

695}
696
697static uchar recv_ida_entries(int f, ida_entries *ent)
698{
699 uchar computed_mask_bits = 0;
700 int i, count = read_varint_bounded(f, 0, MAX_WIRE_ACL_COUNT, "ACL count");
701
702 ent->idas = count ? new_array(id_access, count) : NULL;
703 ent->count = count;
704
705 for (i = 0; i < count; i++) {
706 uchar has_name;
707 id_t id = read_varint(f);
708 uint32 access = recv_acl_access(f, &has_name);
709
710 if (has_name) {
711 if (access & NAME_IS_USER)
712 id = recv_user_name(f, id);
713 else
714 id = recv_group_name(f, id, NULL);
715 } else if (access & NAME_IS_USER) {
716 if (inc_recurse && !numeric_ids)
717 id = match_uid(id);
718 } else {
719 if (inc_recurse && (!am_root || !numeric_ids))
720 id = match_gid(id, NULL);
721 }
722
723 ent->idas[i].id = id;
724 ent->idas[i].access = access;
725 computed_mask_bits |= access;
726 }
727
728 return computed_mask_bits & ~NO_ENTRY;
729}
730
731static int recv_rsync_acl(int f, item_list *racl_list, SMB_ACL_TYPE_T type, mode_t mode)
732{

Callers 1

recv_rsync_aclFunction · 0.85

Calls 7

read_varint_boundedFunction · 0.85
read_varintFunction · 0.85
recv_acl_accessFunction · 0.85
recv_user_nameFunction · 0.85
recv_group_nameFunction · 0.85
match_uidFunction · 0.85
match_gidFunction · 0.85

Tested by

no test coverage detected