Lines Matching full:uid
112 * routines that control user, group, uid and gid caches (for the archive
136 static UIDC **uidtb; /* uid to name cache */
138 static UIDC **usrtb; /* user name to uid cache */
255 * caches the name (if any) for the uid. If noname clear, we always
262 user_from_uid(uid_t uid, int noname) in user_from_uid() argument
271 * see if we have this uid cached in user_from_uid()
273 pptr = uidtb + (uid % UID_SZ); in user_from_uid()
276 if ((ptr != NULL) && (ptr->valid > 0) && (ptr->uid == uid)) { in user_from_uid()
278 * have an entry for this uid in user_from_uid()
286 * No entry for this uid, we will add it in user_from_uid()
297 if ((pw = (*_pwcache_getpwuid)(uid)) == NULL) { in user_from_uid()
299 * no match for this uid in the local password file in user_from_uid()
300 * a string that is the uid in numeric format in user_from_uid()
304 ptr->uid = uid; in user_from_uid()
305 (void)snprintf(ptr->name, UNMLEN, "%lu", (long) uid); in user_from_uid()
311 * there is an entry for this uid in the password file in user_from_uid()
315 ptr->uid = uid; in user_from_uid()
393 * caches the uid for a given user name. We use a simple hash table.
395 * the uid (if any) for a user name, or a -1 if no match can be found
398 uid_from_user(const char *name, uid_t *uid) in uid_from_user() argument
413 * look up in hash table, if found and valid return the uid, in uid_from_user()
422 *uid = ptr->uid; in uid_from_user()
437 * or store the matching uid in uid_from_user()
442 *uid = pw->pw_uid; in uid_from_user()
451 *uid = ptr->uid = pw->pw_uid; in uid_from_user()
477 * look up in hash table, if found and valid return the uid, in gid_from_group()