CWB
Functions
auth.h File Reference
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

Functions

void add_user_to_list (char *user, char *passwd)
 
void add_host_to_list (char *ipaddr)
 
void add_hosts_in_subnet_to_list (char *ipsubnet)
 
void add_grant_to_last_user (char *corpus)
 
int check_host (struct in_addr host)
 returns true if host is in list of allowed hosts More...
 
int authenticate_user (char *user, char *passwd)
 returns true if (user, passwd) pair is in list of allowed users More...
 
int check_grant (char *user, char *corpus)
 returns true if user may access corpus More...
 
void show_grants (void)
 for debugging only More...
 

Function Documentation

void add_grant_to_last_user ( char *  corpus)
void add_host_to_list ( char *  ipaddr)
void add_hosts_in_subnet_to_list ( char *  ipsubnet)
void add_user_to_list ( char *  user,
char *  passwd 
)
int authenticate_user ( char *  user,
char *  passwd 
)

returns true if (user, passwd) pair is in list of allowed users

References find_user(), _UserEntry::passwd, and user.

Referenced by main().

int check_grant ( char *  user,
char *  corpus 
)

returns true if user may access corpus

References _Grant::corpus, find_user(), _UserEntry::grants, _Grant::next, and user.

Referenced by main().

int check_host ( struct in_addr  host)

returns true if host is in list of allowed hosts

References _HostEntry::accept_any, _HostEntry::address, and _HostEntry::next.

Referenced by accept_connection().

void show_grants ( void  )