mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-09-08 11:22:14 -04:00
Add new code to recv_group_name() too.
This commit is contained in:
1 parent
d2406ae372
commit
284c28c773
1 file changed
+11
-5
@@ -390,12 +390,18 @@ gid_t recv_group_name(int f, gid_t gid, uint16 *flags_ptr)
|
||||
{
|
||||
struct idlist *node;
|
||||
int len = read_byte(f);
|
||||
char *name = new_array(char, len+1);
|
||||
read_sbuf(f, name, len);
|
||||
if (numeric_ids < 0) {
|
||||
free(name);
|
||||
char *name;
|
||||
|
||||
if (len) {
|
||||
name = new_array(char, len+1);
|
||||
read_sbuf(f, name, len);
|
||||
if (numeric_ids < 0) {
|
||||
free(name);
|
||||
name = NULL;
|
||||
}
|
||||
} else
|
||||
name = NULL;
|
||||
}
|
||||
|
||||
node = recv_add_id(&gidlist, gidmap, gid, name); /* node keeps name's memory */
|
||||
if (flags_ptr && node->flags & FLAG_SKIP_GROUP)
|
||||
*flags_ptr |= FLAG_SKIP_GROUP;
|
||||
|
||||
Reference in new issue
Block a user