version 1.7, 2002/07/15 17:20:36 |
version 1.8, 2003/06/12 22:30:23 |
|
|
/* We depend on that for hash_table and YOUR compiler had BETTER do it! */ |
/* We depend on that for hash_table and YOUR compiler had BETTER do it! */ |
struct hash_el hash_table[Table_size]; |
struct hash_el hash_table[Table_size]; |
|
|
void init_hash() |
void |
|
init_hash(void) |
{ |
{ |
/* |
/* |
* There used to be some steps we had to take to initialize things. |
* There used to be some steps we had to take to initialize things. |
|
|
*/ |
*/ |
} |
} |
|
|
char *username(uid) |
char * |
|
username(uid_t uid) |
uid_t uid; |
|
|
|
{ |
{ |
int hashindex; |
int hashindex; |
|
|
|
|
return(hash_table[hashindex].name); |
return(hash_table[hashindex].name); |
} |
} |
|
|
uid_t userid(username) |
uid_t |
|
userid(char *username) |
char *username; |
|
|
|
{ |
{ |
struct passwd *pwd; |
struct passwd *pwd; |
|
|
|
|
return(pwd->pw_uid); |
return(pwd->pw_uid); |
} |
} |
|
|
static int enter_user(uid, name, wecare) |
/* wecare: 1 = enter it always, 0 = nice to have */ |
|
static int |
uid_t uid; |
enter_user(uid_t uid, char *name, int wecare) |
char *name; |
|
int wecare; /* 1 = enter it always, 0 = nice to have */ |
|
|
|
{ |
{ |
int hashindex; |
int hashindex; |
|
|
|
|
* and cache any entries we pass over while looking. |
* and cache any entries we pass over while looking. |
*/ |
*/ |
|
|
static int get_user(uid) |
static int |
|
get_user(uid_t uid) |
uid_t uid; |
|
|
|
{ |
{ |
struct passwd *pwd; |
struct passwd *pwd; |
|
|