| 434 | } |
| 435 | |
| 436 | gid_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 */ |
no test coverage detected