Lines Matching refs:gid
110 * routines that control user, group, uid and gid caches (for the archive
135 static GIDC **gidtb; /* gid to name cache */
137 static GIDC **grptb; /* group name to gid cache */
322 * caches the name (if any) for the gid. If noname clear, we always
329 group_from_gid(gid_t gid, int noname)
338 * see if we have this gid cached
340 pptr = gidtb + (gid % GID_SZ);
343 if ((ptr != NULL) && (ptr->valid > 0) && (ptr->gid == gid)) {
345 * have an entry for this gid
353 * No entry for this gid, we will add it
364 if ((gr = (*_pwcache_getgrgid)(gid)) == NULL) {
366 * no match for this gid in the local group file, put in
367 * a string that is the gid in numeric format
371 ptr->gid = gid;
372 (void)snprintf(ptr->name, GNMLEN, "%lu", (long) gid);
382 ptr->gid = gid;
455 * caches the gid for a given group name. We use a simple hash table.
457 * the gid (if any) for a group name, or a -1 if no match can be found
460 gid_from_group(const char *name, gid_t *gid)
484 *gid = ptr->gid;
499 * or store the matching gid
504 *gid = gr->gr_gid;
514 *gid = ptr->gid = gr->gr_gid;