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

Function recv_group_name

uidlist.c:436–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436gid_t recv_group_name(int f, gid_t gid, uint16 *flags_ptr)
437{
438 struct idlist *node;
439 int len = read_byte(f);
440 char *name;
441
442 if (len) {
443 name = new_array(char, len+1);
444 read_sbuf(f, name, len);
445 if (numeric_ids < 0) {
446 free(name);
447 name = NULL;
448 }
449 } else
450 name = NULL;
451
452 node = recv_add_id(&gidlist, gidmap, gid, name); /* node keeps name's memory */
453 if (flags_ptr && node->flags & FLAG_SKIP_GROUP)
454 *flags_ptr |= FLAG_SKIP_GROUP;
455 return node->id2;
456}
457
458/* recv a complete uid/gid mapping from the peer and map the uid/gid
459 * in the file list to local names */

Callers 3

recv_id_listFunction · 0.85
recv_ida_entriesFunction · 0.85
recv_file_entryFunction · 0.85

Calls 3

read_byteFunction · 0.85
read_sbufFunction · 0.85
recv_add_idFunction · 0.85

Tested by

no test coverage detected