Collaboration diagram for Plaintext authentication and acl module:
|
Functions | |
| G_MODULE_EXPORT uint32_t | get_api_version () |
| static char * | strip_line (char *line, int acceptnull) |
| static int | parse_ints (char *intline, GSList **p_intlist, char *prefix) |
| static int | parse_ports (char *portsline, GSList **p_portslist, char *prefix) |
| static int | match_ip (GSList *ip_list, struct in6_addr *addr) |
| static int | parse_ips (char *ipsline, GSList **ip_list, char *prefix) |
| static int | read_user_list (struct plaintext_params *params) |
| static int | read_acl_list (struct plaintext_params *params) |
| G_MODULE_EXPORT gboolean | unload_module_with_params (struct plaintext_params *params) |
| G_MODULE_EXPORT gboolean | init_module_from_conf (module_t *module) |
| static gint | find_by_username (struct plaintext_user *a, struct plaintext_user *b) |
| static GSList * | fill_user_by_username (const char *username, gpointer params) |
| G_MODULE_EXPORT int | user_check (const char *username, const char *clientpass, unsigned passlen, user_session_t *session, gpointer params) |
| G_MODULE_EXPORT uint32_t | get_user_id (const char *username, gpointer params) |
| G_MODULE_EXPORT GSList * | get_user_groups (const char *username, gpointer params) |
| G_MODULE_EXPORT GSList * | acl_check (connection_t *element, gpointer params) |
| G_MODULE_EXPORT GSList* acl_check | ( | connection_t * | element, | |
| gpointer | params | |||
| ) |
Definition at line 1033 of file plaintext.c.
References plaintext_acl::aclname, acl_group::answer, connection_t::app_name, plaintext_acl::apps, plaintext_acl::auth_quality, acl_group::auth_quality, compare_iface_nfo_t(), tracking_t::daddr, DEBUG_AREA_MAIN, debug_log_message, plaintext_acl::decision, tracking_t::dest, plaintext_acl::dst_ip, plaintext_acl::dst_ports, plaintext_ports::firstport, plaintext_acl::flags, acl_group::flags, plaintext_acl::groups, acl_group::groups, connection_t::iface_nfo, plaintext_acl::iface_nfo, log_message, acl_group::log_prefix, plaintext_acl::log_prefix, match_ip(), plaintext_ports::nbports, NU_EXIT_ERROR, plaintext_acl::os, connection_t::os_release, connection_t::os_sysname, connection_t::os_version, acl_group::period, plaintext_acl::period, plaintext_acl::proto, tracking_t::protocol, tracking_t::saddr, tracking_t::source, plaintext_acl::src_ip, plaintext_acl::src_ports, connection_t::tracking, tracking_t::type, plaintext_acl::types, plaintext_acl::users, and acl_group::users.
Here is the call graph for this function:

| static GSList* fill_user_by_username | ( | const char * | username, | |
| gpointer | params | |||
| ) | [static] |
Definition at line 935 of file plaintext.c.
References DEBUG_AREA_AUTH, find_by_username(), get_rid_of_domain(), log_message, and plaintext_user::username.
Referenced by get_user_groups(), get_user_id(), and user_check().
Here is the call graph for this function:

| static gint find_by_username | ( | struct plaintext_user * | a, | |
| struct plaintext_user * | b | |||
| ) | [static] |
Definition at line 929 of file plaintext.c.
References plaintext_user::username.
Referenced by fill_user_by_username().
| G_MODULE_EXPORT uint32_t get_api_version | ( | ) |
Returns version of nuauth API
Definition at line 37 of file plaintext.c.
References NUAUTH_API_VERSION.
| G_MODULE_EXPORT GSList* get_user_groups | ( | const char * | username, | |
| gpointer | params | |||
| ) |
Definition at line 1019 of file plaintext.c.
References fill_user_by_username(), and plaintext_user::groups.
Here is the call graph for this function:

| G_MODULE_EXPORT uint32_t get_user_id | ( | const char * | username, | |
| gpointer | params | |||
| ) |
Definition at line 1007 of file plaintext.c.
References fill_user_by_username().
Here is the call graph for this function:

| G_MODULE_EXPORT gboolean init_module_from_conf | ( | module_t * | module | ) |
Definition at line 885 of file plaintext.c.
References DEBUG_AREA_AUTH, DEBUG_AREA_MAIN, FALSE, module_t::hook, log_message, MOD_ACL_CHECK, MOD_USER_CHECK, MOD_USER_GROUPS, MOD_USER_ID, nubase_config_table_get_or_default(), module_t::params, plaintext_params::plaintext_aclfile, plaintext_params::plaintext_acllist, plaintext_params::plaintext_userfile, plaintext_params::plaintext_userlist, read_acl_list(), read_user_list(), TEXplaintext_ACLFILE, TEXplaintext_USERFILE, and TRUE.
Here is the call graph for this function:

| static int match_ip | ( | GSList * | ip_list, | |
| struct in6_addr * | addr | |||
| ) | [static] |
Try to match an address from an IP/mask list.
| ip_list | Single linked list of plaintext_ip items | |
| addr | Address to match |
Definition at line 199 of file plaintext.c.
References compare_ipv6_with_mask().
Referenced by acl_check().
Here is the call graph for this function:

| static int parse_ints | ( | char * | intline, | |
| GSList ** | p_intlist, | |||
| char * | prefix | |||
| ) | [static] |
parse_ints() Extracts integers (like group ids) in intline and fills *p_intlist. prefix is displayed in front of the log messages. Returns 0 if successful.
Definition at line 79 of file plaintext.c.
References DEBUG_AREA_MAIN, debug_log_message, and log_message.
Referenced by read_acl_list(), and read_user_list().
| static int parse_ips | ( | char * | ipsline, | |
| GSList ** | ip_list, | |||
| char * | prefix | |||
| ) | [static] |
parse_ips() Extracts IP addresses from ipsline and fills *ipslist. prefix is displayed in front of the log messages. Returns 0 if successful.
Definition at line 218 of file plaintext.c.
References plaintext_ip::addr, compare_ipv6_with_mask(), create_ipv6_netmask(), DEBUG_AREA_MAIN, FALSE, format_ipv6(), ipv4_to_ipv6(), log_message, plaintext_ip::netmask, and strip_line().
Referenced by read_acl_list().
Here is the call graph for this function:

| static int parse_ports | ( | char * | portsline, | |
| GSList ** | p_portslist, | |||
| char * | prefix | |||
| ) | [static] |
parse_ports() Extracts ports from groupline and fills *p_portslist. prefix is displayed in front of the log messages. Returns 0 if successful.
Definition at line 127 of file plaintext.c.
References DEBUG_AREA_MAIN, debug_log_message, plaintext_ports::firstport, log_message, and plaintext_ports::nbports.
Referenced by read_acl_list().
| static int read_acl_list | ( | struct plaintext_params * | params | ) | [static] |
read_acl_list() Reads acls conf file and fills the *plaintext_acllist structure. Returns 0 if successful.
ACL begins with "[ACL name]", then each line should have the structure "key = value". For example "proto = 6".
Definition at line 429 of file plaintext.c.
References ACL_FLAGS_NONE, plaintext_acl::aclname, plaintext_app::appname, plaintext_acl::apps, plaintext_acl::auth_quality, DEBUG_AREA_MAIN, debug_log_message, plaintext_acl::decision, DECISION_ACCEPT, DECISION_DROP, DECISION_REJECT, plaintext_acl::dst_ip, plaintext_acl::dst_ports, FALSE, plaintext_acl::flags, plaintext_acl::groups, plaintext_acl::iface_nfo, IFNAMSIZ, iface_nfo_t::indev, log_message, plaintext_acl::log_prefix, plaintext_acl::os, iface_nfo_t::outdev, parse_ints(), parse_ips(), parse_ports(), plaintext_acl::period, iface_nfo_t::physindev, iface_nfo_t::physoutdev, plaintext_params::plaintext_aclfile, plaintext_params::plaintext_acllist, plaintext_acl::proto, plaintext_os::release, plaintext_acl::src_ip, plaintext_acl::src_ports, strip_line(), plaintext_os::sysname, TRUE, plaintext_acl::types, plaintext_acl::users, and plaintext_os::version.
Referenced by init_module_from_conf().
Here is the call graph for this function:

| static int read_user_list | ( | struct plaintext_params * | params | ) | [static] |
read_user_list() Reads users conf file and fills the *plaintext_userlist structure. Returns 0 if successful. Line format: "username:passwd:gid1,gid2,gid3" (gid are numbers)
Definition at line 306 of file plaintext.c.
References DEBUG_AREA_AUTH, debug_log_message, log_message, parse_ints(), plaintext_params::plaintext_userfile, plaintext_params::plaintext_userlist, strip_line(), TRUE, and plaintext_user::uid.
Referenced by init_module_from_conf().
Here is the call graph for this function:

| static char* strip_line | ( | char * | line, | |
| int | acceptnull | |||
| ) | [static] |
strip_line() Returns a pointer on stripped line or NULL if the line should be skipped and acceptnull is true.
Definition at line 48 of file plaintext.c.
Referenced by parse_ips(), read_acl_list(), and read_user_list().
| G_MODULE_EXPORT gboolean unload_module_with_params | ( | struct plaintext_params * | params | ) |
Definition at line 790 of file plaintext.c.
References plaintext_acl::aclname, plaintext_app::appname, plaintext_acl::apps, DEBUG_AREA_MAIN, debug_log_message, plaintext_acl::dst_ip, plaintext_acl::dst_ports, plaintext_acl::groups, plaintext_user::groups, plaintext_acl::os, plaintext_user::passwd, plaintext_acl::period, plaintext_params::plaintext_aclfile, plaintext_params::plaintext_acllist, plaintext_params::plaintext_userfile, plaintext_params::plaintext_userlist, plaintext_os::release, plaintext_acl::src_ip, plaintext_acl::src_ports, plaintext_os::sysname, TRUE, plaintext_acl::types, plaintext_user::username, plaintext_acl::users, and plaintext_os::version.
| G_MODULE_EXPORT int user_check | ( | const char * | username, | |
| const char * | clientpass, | |||
| unsigned | passlen, | |||
| user_session_t * | session, | |||
| gpointer | params | |||
| ) |
| username | user name string | |
| clientpass | user provided password | |
| passlen | password length | |
| session | pointer to the user_session_t:: that we working on | |
| params | module related parameter |
Definition at line 967 of file plaintext.c.
References DEBUG_AREA_AUTH, DEBUG_AREA_MAIN, debug_log_message, fill_user_by_username(), log_message, and verify_user_password().
Here is the call graph for this function:

1.4.7