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

Function match_gid

uidlist.c:317–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317gid_t match_gid(gid_t gid, uint16 *flags_ptr)
318{
319 static struct idlist *last = NULL;
320 struct idlist *list;
321
322 if (last && id_eq_gid(last->id, gid))
323 list = last;
324 else {
325 for (list = gidlist; list; list = list->next) {
326 if (id_eq_gid(list->id, gid))
327 break;
328 }
329 if (!list)
330 list = recv_add_id(&gidlist, gidmap, gid, NULL);
331 last = list;
332 }
333
334 if (flags_ptr && list->flags & FLAG_SKIP_GROUP)
335 *flags_ptr |= FLAG_SKIP_GROUP;
336 return list->id2;
337}
338
339/* Add a uid to the list of uids. Only called on sending side. */
340const char *add_uid(uid_t uid)

Callers 4

recv_id_listFunction · 0.85
recv_ida_entriesFunction · 0.85
match_racl_idsFunction · 0.85
recv_file_entryFunction · 0.85

Calls 2

id_eq_gidFunction · 0.85
recv_add_idFunction · 0.85

Tested by

no test coverage detected