1 /* 2 * This program may be freely redistributed, 3 * but this entire comment MUST remain intact. 4 * 5 * Copyright (c) 1984, 1989, William LeFebvre, Rice University 6 * Copyright (c) 1989, 1990, 1992, William LeFebvre, Northwestern University 7 * Copyright (c) 2016, Randy Westlund 8 * 9 * $FreeBSD$ 10 */ 11 #ifndef USERNAME_H 12 #define USERNAME_H 13 14 #include <stdbool.h> 15 16 int enter_user(int uid, char *name, bool wecare); 17 int get_user(int uid); 18 void init_hash(void); 19 char *username(int uid); 20 int userid(char *username); 21 22 /* 23 * "Table_size" defines the size of the hash tables used to map uid to 24 * username. The number of users in /etc/passwd CANNOT be greater than 25 * this number. If the error message "table overflow: too many users" 26 * is printed by top, then "Table_size" needs to be increased. Things will 27 * work best if the number is a prime number that is about twice the number 28 * of lines in /etc/passwd. 29 */ 30 #define Table_size 20011 31 32 #endif /* USERNAME_H */ 33