Collaboration diagram for LDAP authentication and acl module:
|
Files | |
| file | ldap.c |
| Contains all LDAP modules functions. | |
Data Structures | |
| struct | weighted_acl |
Functions | |
| void | number_multiply (number_t number, digit_t factor) |
| int | number_add (number_t number, digit_t value) |
| char * | number_to_decimal (number_t number) |
| int | decimal_to_number (const char *orig_decimal, number_t number) |
| static void | ldap_conn_destroy (void *connection) |
| G_MODULE_EXPORT gboolean | unload_module_with_params (gpointer params_p) |
| G_MODULE_EXPORT gboolean | init_module_from_conf (module_t *module) |
| G_MODULE_EXPORT gchar * | g_module_unload (void) |
| static LDAP * | ldap_conn_init (struct ldap_params *params) |
| static char * | ipv6_to_base10 (struct in6_addr *addr) |
| gchar * | escape_string_for_ldap (const gchar *basestring) |
| Escape character to protect them in query. | |
| gint | compare_acl_weight (gconstpointer data1, gconstpointer data2) |
| static void | local_free (gpointer data, gpointer userdata) |
| static nu_error_t | field_match_pattern (gchar *value, LDAP *ld, LDAPMessage *result, gchar *attribute) |
| G_MODULE_EXPORT GSList * | acl_check (connection_t *element, gpointer params_p) |
| Acl check function. | |
| G_MODULE_EXPORT GSList* acl_check | ( | connection_t * | element, | |
| gpointer | params_p | |||
| ) |
Acl check function.
This function realise the matching of a packet against the set of rules. It is exported by the modules and called by nuauth core.
| element | A pointer to a connection_t which contains all informations available about the packet | |
| params_p | A pointer to the parameters of the module instance we're working for |
Definition at line 439 of file ldap.c.
References ACL_FLAGS_NONE, acl_group::answer, connection_t::app_name, acl_group::auth_quality, tracking_t::code, compare_acl_weight(), tracking_t::daddr, DEBUG, DEBUG_AREA_AUTH, DEBUG_AREA_MAIN, DEBUG_AREA_PERF, nuauth_params::debug_areas, debug_log_message, tracking_t::dest, err, FALSE, acl_group::flags, acl_group::groups, connection_t::iface_nfo, iface_nfo_t::indev, ipv6_to_base10(), ipv6_to_ipv4(), is_ipv4(), ldap_params::ldap_acls_base_dn, ldap_conn_init(), ldap_params::ldap_filter_type, LDAP_MAX_TRY, ldap_params::ldap_priv, LDAP_QUERY_SIZE, ldap_params::ldap_request_timeout, ldap_params::ldap_use_ipv4_schema, local_free(), log_message, acl_group::log_prefix, nuauthconf, connection_t::os_release, connection_t::os_sysname, connection_t::os_version, iface_nfo_t::outdev, acl_group::period, iface_nfo_t::physindev, iface_nfo_t::physoutdev, nuauth_params::prio_to_nok, tracking_t::protocol, tracking_t::saddr, secure_snprintf(), TEST_PATTERN, connection_t::tracking, tracking_t::type, and acl_group::users.
Here is the call graph for this function:

| gint compare_acl_weight | ( | gconstpointer | data1, | |
| gconstpointer | data2 | |||
| ) |
| int decimal_to_number | ( | const char * | orig_decimal, | |
| number_t | number | |||
| ) |
Convert a decimal string to a "Base 10^n" number.
Definition at line 137 of file ldap.c.
References BASE_LOG10, DIGIT_COUNT, and err.
| gchar* escape_string_for_ldap | ( | const gchar * | basestring | ) |
| static nu_error_t field_match_pattern | ( | gchar * | value, | |
| LDAP * | ld, | |||
| LDAPMessage * | result, | |||
| gchar * | attribute | |||
| ) | [static] |
Definition at line 399 of file ldap.c.
References NU_EXIT_CONTINUE, and NU_EXIT_OK.
| G_MODULE_EXPORT gchar* g_module_unload | ( | void | ) |
| G_MODULE_EXPORT gboolean init_module_from_conf | ( | module_t * | module | ) |
Init ldap system.
Definition at line 191 of file ldap.c.
References ldap_params::binddn, ldap_params::bindpasswd, DEBUG_AREA_MAIN, ldap_params::ldap_acls_base_dn, LDAP_BASE, ldap_conn_destroy(), LDAP_CRED, ldap_params::ldap_filter_type, ldap_params::ldap_priv, LDAP_REQUEST_TIMEOUT, ldap_params::ldap_request_timeout, LDAP_SERVER, ldap_params::ldap_server, LDAP_SERVER_PORT, ldap_params::ldap_server_port, ldap_params::ldap_use_ipv4_schema, LDAP_USER, ldap_params::ldap_users_base_dn, log_message, nubase_config_table_get_or_default(), nubase_config_table_get_or_default_int(), module_t::params, and TRUE.
Here is the call graph for this function:

| static char* ipv6_to_base10 | ( | struct in6_addr * | addr | ) | [static] |
Definition at line 302 of file ldap.c.
References INIT_NUMBER, number_add(), number_multiply(), and number_to_decimal().
Referenced by acl_check().
Here is the call graph for this function:

| static void ldap_conn_destroy | ( | void * | connection | ) | [static] |
| static LDAP* ldap_conn_init | ( | struct ldap_params * | params | ) | [static] |
Initialize connection to ldap server.
Definition at line 238 of file ldap.c.
References ldap_params::binddn, ldap_params::bindpasswd, DEBUG_AREA_AUTH, DEBUG_AREA_MAIN, err, ldap_params::ldap_priv, ldap_params::ldap_server, ldap_params::ldap_server_port, log_message, and secure_snprintf().
Referenced by acl_check().
Here is the call graph for this function:

| static void local_free | ( | gpointer | data, | |
| gpointer | userdata | |||
| ) | [static] |
Add a value to a "Base 10^n" number
Definition at line 98 of file ldap.c.
References BASE, and DIGIT_COUNT.
Referenced by ipv6_to_base10().
Multiply a "Base 10^n" number by a factor
Definition at line 76 of file ldap.c.
References BASE, and DIGIT_COUNT.
Referenced by ipv6_to_base10().
| char* number_to_decimal | ( | number_t | number | ) |
Convert a "Base 10^n" number to decimal string.
Definition at line 117 of file ldap.c.
References BASE2STR, BASE_LOG10, and DIGIT_COUNT.
Referenced by ipv6_to_base10().
| G_MODULE_EXPORT gboolean unload_module_with_params | ( | gpointer | params_p | ) |
1.4.7