LDAP authorization and authentication module. More...
#include <freeradius-devel/rad_assert.h>
#include <stdarg.h>
#include <ctype.h>
#include "ldap.h"
#include <freeradius-devel/map_proc.h>
Go to the source code of this file.
Functions | |
static rlm_rcode_t | CC_HINT (nonnull) |
static ssize_t | ldap_escape_xlat (char **out, size_t outlen, UNUSED void const *mod_inst, UNUSED void const *xlat_inst, REQUEST *request, char const *fmt) |
static ssize_t | ldap_unescape_xlat (char **out, size_t outlen, UNUSED void const *mod_inst, UNUSED void const *xlat_inst, REQUEST *request, char const *fmt) |
static ssize_t | ldap_xlat (char **out, size_t outlen, void const *mod_inst, UNUSED void const *xlat_inst, REQUEST *request, char const *fmt) |
Expand an LDAP URL into a query, and return a string result from that query. More... | |
static rlm_rcode_t | mod_accounting (void *instance, REQUEST *request) CC_HINT(nonnull) |
static rlm_rcode_t | mod_authenticate (void *instance, REQUEST *request) CC_HINT(nonnull) |
static rlm_rcode_t | mod_authorize (void *instance, REQUEST *request) CC_HINT(nonnull) |
static int | mod_bootstrap (CONF_SECTION *conf, void *instance) |
Bootstrap the module. More... | |
static int | mod_detach (void *instance) |
Detach from the LDAP server and cleanup internal state. More... | |
static int | mod_instantiate (CONF_SECTION *conf, void *instance) |
Instantiate the module. More... | |
static rlm_rcode_t | mod_map_proc (void *mod_inst, UNUSED void *proc_inst, REQUEST *request, char const *url, vp_map_t const *maps) |
Perform a search and map the result of the search to server attributes. More... | |
static rlm_rcode_t | mod_post_auth (void *instance, REQUEST *request) CC_HINT(nonnull) |
static int | parse_sub_section (rlm_ldap_t *inst, CONF_SECTION *parent, ldap_acct_section_t **config, rlm_components_t comp) |
Parse an accounting sub section. More... | |
static int | rlm_ldap_groupcmp (void *instance, REQUEST *request, UNUSED VALUE_PAIR *thing, VALUE_PAIR *check, UNUSED VALUE_PAIR *check_pairs, UNUSED VALUE_PAIR **reply_pairs) |
Perform LDAP-Group comparison checking. More... | |
static rlm_rcode_t | rlm_ldap_map_profile (rlm_ldap_t const *inst, REQUEST *request, ldap_handle_t **pconn, char const *dn, rlm_ldap_map_exp_t const *expanded) |
Search for and apply an LDAP profile. More... | |
static rlm_rcode_t | user_modify (rlm_ldap_t *inst, REQUEST *request, ldap_acct_section_t *section) |
Modify user's object in LDAP. More... | |
Variables | |
static const CONF_PARSER | acct_section_config [] |
static CONF_PARSER | client_config [] |
static CONF_PARSER | group_config [] |
static FR_NAME_NUMBER const | ldap_dereference [] |
FR_NAME_NUMBER const | ldap_scope [] |
static const CONF_PARSER | module_config [] |
static CONF_PARSER | option_config [] |
static CONF_PARSER | profile_config [] |
module_t | rlm_ldap |
static CONF_PARSER | sasl_mech_dynamic [] |
static CONF_PARSER | sasl_mech_static [] |
static CONF_PARSER | tls_config [] |
static CONF_PARSER | user_config [] |
LDAP authorization and authentication module.
Definition in file rlm_ldap.c.
|
static |
|
static |
Definition at line 257 of file rlm_ldap.c.
|
static |
Definition at line 264 of file rlm_ldap.c.
|
static |
Expand an LDAP URL into a query, and return a string result from that query.
Definition at line 274 of file rlm_ldap.c.
|
static |
|
static |
|
static |
|
static |
Bootstrap the module.
Define attributes.
conf | to parse. |
instance | configuration data. |
Definition at line 721 of file rlm_ldap.c.
|
static |
Detach from the LDAP server and cleanup internal state.
Definition at line 642 of file rlm_ldap.c.
|
static |
Instantiate the module.
Creates a new instance of the module reading parameters from a configuration section.
conf | to parse. |
instance | configuration data. |
Definition at line 787 of file rlm_ldap.c.
|
static |
Perform a search and map the result of the search to server attributes.
Unlike LDAP xlat, this can be used to process attributes from multiple entries.
[in] | mod_inst | rlm_ldap_t |
[in] | proc_inst | unused. |
[in,out] | request | The current request. |
[in] | url | LDAP url specifying base DN and filter. |
[in] | maps | Head of the map list. |
Definition at line 381 of file rlm_ldap.c.
|
static |
|
static |
Parse an accounting sub section.
Allocate a new ldap_acct_section_t and write the config data into it.
[in] | inst | rlm_ldap configuration. |
[in] | parent | of the config section. |
[out] | config | to write the sub section parameters to. |
[in] | comp | The section name were parsing the config for. |
Definition at line 684 of file rlm_ldap.c.
|
static |
Perform LDAP-Group comparison checking.
Attempts to match users to groups using a variety of methods.
instance | of the rlm_ldap module. |
request | Current request. |
thing | Unknown. |
check | Which group to check for user membership. |
check_pairs | Unknown. |
reply_pairs | Unknown. |
Definition at line 526 of file rlm_ldap.c.
|
static |
Search for and apply an LDAP profile.
LDAP profiles are mapped using the same attribute map as user objects, they're used to add common sets of attributes to the request.
[in] | inst | rlm_ldap configuration. |
[in] | request | Current request. |
[in,out] | pconn | to use. May change as this function calls functions which auto re-connect. |
[in] | dn | of profile object to apply. |
[in] | expanded | Structure containing a list of xlat expanded attribute names and mapping information. |
Definition at line 1510 of file rlm_ldap.c.
|
static |
Modify user's object in LDAP.
Process a modifcation map to update a user object in the LDAP directory.
inst | rlm_ldap instance. |
request | Current request. |
section | that holds the map to process. |
Definition at line 1814 of file rlm_ldap.c.
|
static |
Definition at line 167 of file rlm_ldap.c.
|
static |
Definition at line 157 of file rlm_ldap.c.
|
static |
Definition at line 142 of file rlm_ldap.c.
|
static |
Definition at line 66 of file rlm_ldap.c.
FR_NAME_NUMBER const ldap_scope[] |
Definition at line 44 of file rlm_ldap.c.
|
static |
Definition at line 219 of file rlm_ldap.c.
|
static |
Definition at line 177 of file rlm_ldap.c.
|
static |
Definition at line 115 of file rlm_ldap.c.
module_t rlm_ldap |
Definition at line 2062 of file rlm_ldap.c.
|
static |
Definition at line 75 of file rlm_ldap.c.
|
static |
Definition at line 82 of file rlm_ldap.c.
|
static |
Definition at line 92 of file rlm_ldap.c.
|
static |
Definition at line 125 of file rlm_ldap.c.