Lines Matching defs:gid
113 * routines that control user, group, uid and gid caches (for the archive
138 static GIDC **gidtb; /* gid to name cache */
140 static GIDC **grptb; /* group name to gid cache */
325 * caches the name (if any) for the gid. If noname clear, we always
332 group_from_gid(gid_t gid, int noname)
341 * see if we have this gid cached
343 pptr = gidtb + (gid % GID_SZ);
346 if ((ptr != NULL) && (ptr->valid > 0) && (ptr->gid == gid)) {
348 * have an entry for this gid
356 * No entry for this gid, we will add it
367 if ((gr = (*_pwcache_getgrgid)(gid)) == NULL) {
369 * no match for this gid in the local group file, put in
370 * a string that is the gid in numberic format
374 ptr->gid = gid;
375 (void)snprintf(ptr->name, GNMLEN, "%lu", (long) gid);
385 ptr->gid = gid;
458 * caches the gid for a given group name. We use a simple hash table.
460 * the gid (if any) for a group name, or a -1 if no match can be found
463 gid_from_group(const char *name, gid_t *gid)
487 *gid = ptr->gid;
502 * or store the matching gid
507 *gid = gr->gr_gid;
517 *gid = ptr->gid = gr->gr_gid;