Lines Matching refs:uid
56 * routines that control user, group, uid and gid caches (for the archive
64 static UIDC **uidtb = NULL; /* uid to name cache */
66 static UIDC **usrtb = NULL; /* user name to uid cache */
167 * caches the name (if any) for the uid. If frc set, we always return the
174 name_uid(uid_t uid, int frc)
183 * see if we have this uid cached
185 ptr = uidtb[uid % UID_SZ];
186 if ((ptr != NULL) && (ptr->valid > 0) && (ptr->uid == uid)) {
188 * have an entry for this uid
196 * No entry for this uid, we will add it
203 ptr = uidtb[uid % UID_SZ] = (UIDC *)malloc(sizeof(UIDC));
205 if ((pw = getpwuid(uid)) == NULL) {
207 * no match for this uid in the local password file
208 * a string that is the uid in numeric format
212 ptr->uid = uid;
215 (void)snprintf(ptr->name, sizeof(ptr->name), "%u", uid);
218 (unsigned long)uid);
224 * there is an entry for this uid in the password file
228 ptr->uid = uid;
309 * caches the uid for a given user name. We use a simple hash table.
311 * the uid (if any) for a user name, or a -1 if no match can be found
315 uid_name(char *name, uid_t *uid)
330 * look up in hash table, if found and valid return the uid,
337 *uid = ptr->uid;
352 * or store the matching uid
357 *uid = pw->pw_uid;
367 *uid = ptr->uid = pw->pw_uid;
394 * look up in hash table, if found and valid return the uid,