4 char authenticate_user(const char * username, const char* pwd);
6 char isallowed(const char *username, const char * perm);
8 // Initialise the list of of user passwords permissions from file
9 void init_passwords(const char *filename);
10 // Free all space used for internal data structures
11 void close_passwords();
13 #define MAX_USERS 128 // Maximum number of users
14 #define USERNAME_LENGTH 12 // Max length of user name
15 #define PWDHASH_LENGTH 40 // Max lenght of pwd hash
18 char username[USERNAME_LENGTH+1];
19 char pwdhash[PWDHASH_LENGTH+1];
20 char *perms; // pointer to string containing ":" delimited permissions
23 typedef pwdentry *p_pwdentry;
25 #define GUEST_USER "guest"