Lines Matching full:uid
48 * routines that control user, group, uid and gid caches (for the archive
56 static UIDC **uidtb = NULL; /* uid to name cache */
58 static UIDC **usrtb = NULL; /* user name to uid cache */
159 * caches the name (if any) for the uid. If frc set, we always return the
166 name_uid(uid_t uid, int frc) in name_uid() argument
175 * see if we have this uid cached in name_uid()
177 ptr = uidtb[uid % UID_SZ]; in name_uid()
178 if ((ptr != NULL) && (ptr->valid > 0) && (ptr->uid == uid)) { in name_uid()
180 * have an entry for this uid in name_uid()
188 * No entry for this uid, we will add it in name_uid()
195 ptr = uidtb[uid % UID_SZ] = (UIDC *)malloc(sizeof(UIDC)); in name_uid()
197 if ((pw = getpwuid(uid)) == NULL) { in name_uid()
199 * no match for this uid in the local password file in name_uid()
200 * a string that is the uid in numeric format in name_uid()
204 ptr->uid = uid; in name_uid()
207 (unsigned long)uid); in name_uid()
212 * there is an entry for this uid in the password file in name_uid()
216 ptr->uid = uid; in name_uid()
293 * caches the uid for a given user name. We use a simple hash table.
295 * the uid (if any) for a user name, or a -1 if no match can be found
299 uid_name(char *name, uid_t *uid) in uid_name() argument
314 * look up in hash table, if found and valid return the uid, in uid_name()
321 *uid = ptr->uid; in uid_name()
336 * or store the matching uid in uid_name()
341 *uid = pw->pw_uid; in uid_name()
351 *uid = ptr->uid = pw->pw_uid; in uid_name()
378 * look up in hash table, if found and valid return the uid, in gid_name()