- for (i = 0; i < pair_cnt; i++)
- pair_list[i].gid = match_gid(pair_list[i].gid);
- }
-}
-
-struct id_pair *id_pair(uid_t uid, gid_t gid)
-{
- static int j = 0;
-
- if (pair_cnt) {
- int start = j;
- /* We start our search where we left off because
- * the IDs usually come in clumps. */
- do {
- if (uid == pair_list[j].uid && gid == pair_list[j].gid)
- return pair_list + j;
- if (++j == pair_cnt)
- j = 0;
- } while (j != start);