$Revision: 1.5 $
Access control module (ac).
Status: NOT REVUED, NOT TESTED
Included from | modules/ac/access_control.h | |
Visible in: | modules/ac/access_control.c | |
Used in: | AC_build() | modules/ac/access_control.c |
Included from | modules/ac/access_control.h | |
Visible in: | modules/ac/access_control.c | |
Used in: | AC_build() | modules/ac/access_control.c |
Prototyped in: | modules/ac/access_control.h | |
Called by: | AC_commit() | modules/ac/access_control.c |
Calls: | CO_get_database_port(), CO_get_host(), CO_get_password(), CO_get_user(), RX_bin_node(), SQ_close_connection(), SQ_errno(), SQ_error(), SQ_execute_query(), SQ_free_result(), SQ_get_column_string(), SQ_get_connection(), SQ_row_next(), TH_acquire_write_lock(), TH_release_write_lock(), TH_run2(), fprintf(), memset(), sscanf(), wr_malloc() | |
References Functions: | AC_decay() | modules/ac/access_control.c |
References Variables: | act_acl | modules/ac/access_control.c |
Show an access control list structure
More:Authors: marek
Calls: | sprintf(), strcpy(), wr_malloc() | |
Called by: | AC_rxwalkhook_print_acl() | modules/ac/access_control.c |
Prototyped in: | modules/ac/access_control.h | |
Calls: | RX_tree_cre(), fprintf() | |
References Variables: | act_acl | modules/ac/access_control.c |
act_hour | modules/ac/access_control.c | |
act_minute | modules/ac/access_control.c | |
act_runtime | modules/ac/access_control.c |
AC_check_acl:
search for this ip or other applicable record in the access control tree
if( bonus in combined runtime+connection accountings > max_bonus in acl) set denial in the acl for this ip (create if needed) if( combined denialcounter > max_denials in acl) set the permanent ban in acl; save in SQL too calculate credit if pointer provided save the access record (ip if created or found/prefix otherwise) at *acl_store if provided
any of the args except address can be NULL
More:Authors: marek
Prototyped in: | modules/ac/access_control.h | |
Calls: | IP_sizebits(), RX_bin_search(), TH_acquire_read_lock(), TH_acquire_write_lock(), TH_release_read_lock(), TH_release_write_lock(), fprintf(), g_list_length(), g_list_nth_data(), memset() | |
References Variables: | act_acl | modules/ac/access_control.c |
Prototyped in: | modules/ac/access_control.h | |
Calls: | AC_acc_addup() | modules/ac/access_control.c |
IP_sizebits(), RX_bin_node(), RX_bin_search(), TH_acquire_write_lock(), TH_release_write_lock(), fprintf(), g_list_length(), g_list_nth_data(), memcpy(), wr_malloc() | ||
References Variables: | act_runtime | modules/ac/access_control.c |
Calls: | TH_acquire_write_lock(), TH_release_write_lock(), printf(), rx_walk_tree(), sleep() | |
Used in: | AC_acc_load() | modules/ac/access_control.c |
References Functions: | AC_decay_hook() | modules/ac/access_control.c |
References Variables: | act_runtime | modules/ac/access_control.c |
Used in: | AC_decay() | modules/ac/access_control.c |
Find the runtime accounting record for this IP, store a copy of it in acc_store.
More:Authors: marek
Prototyped in: | modules/ac/access_control.h | |
Calls: | IP_sizebits(), RX_bin_search(), TH_acquire_read_lock(), TH_release_read_lock(), fprintf(), g_list_length(), g_list_nth_data(), memcpy(), memset() | |
References Variables: | act_runtime | modules/ac/access_control.c |
Prototyped in: | modules/ac/access_control.h | |
Calls: | AC_to_string() | modules/ac/access_control.c |
IP_addr_b2a(), SK_cd_puts(), fprintf(), sprintf(), wr_free() |
Prototyped in: | modules/ac/access_control.h | |
Calls: | AC_acl_to_string() | modules/ac/access_control.c |
IP_pref_b2a(), SK_cd_puts(), fprintf(), sprintf(), wr_free() |
Show an access structure
More:Authors: marek
Prototyped in: | modules/ac/access_control.h | |
Calls: | sprintf(), strcpy(), wr_malloc() | |
Called by: | AC_rxwalkhook_print() | modules/ac/access_control.c |