![]() |
The FreeRADIUS server $Id: f3670dba8951ca10eb4948feb3dc3db9423a334f $
|
#include "rlm_ldap.h"#include <freeradius-devel/ldap/conf.h>#include <freeradius-devel/server/map_proc.h>#include <freeradius-devel/server/module_rlm.h>
Include dependency graph for profile.c:Go to the source code of this file.
Data Structures | |
| struct | ldap_profile_ctx_t |
| Holds state of in progress async profile lookups. More... | |
Functions | |
| static unlang_action_t | ldap_map_profile_resume (request_t *request, void *uctx) |
| Process the results of a profile lookup. | |
| static void | ldap_profile_entry_map (bool *fallthrough, request_t *request, ldap_profile_ctx_t *profile_ctx, LDAP *handle, LDAPMessage *entry) |
| Apply the attribute map to a single profile entry. | |
| static unlang_action_t | ldap_profile_search_push (ldap_profile_ctx_t *profile_ctx, request_t *request, char const *base, int scope, char const *filter) |
| Push the resume frame and start the first profile search. | |
| unlang_action_t | rlm_ldap_map_profile (fr_ldap_result_code_t *ret, int *applied, rlm_ldap_t const *inst, request_t *request, fr_ldap_thread_trunk_t *ttrunk, char const *dn, int scope, char const *filter, fr_ldap_map_exp_t const *expanded) |
| Search for and apply an LDAP profile. | |
| unlang_action_t | rlm_ldap_map_profiles (fr_ldap_result_code_t *ret, int *applied, rlm_ldap_t const *inst, request_t *request, fr_ldap_thread_trunk_t *ttrunk, char const *const *dn_list, char const *filter, fr_ldap_map_exp_t const *expanded) |
| Search for and apply a set of LDAP profiles. | |
| struct ldap_profile_ctx_t |
Collaboration diagram for ldap_profile_ctx_t:| Data Fields | ||
|---|---|---|
| int * | applied | Number of profiles applied. |
| char const * | dn |
DN of the profile object being retrieved. NULL when all profiles are retrieved by one search. |
| fr_ldap_map_exp_t const * | expanded | |
| char const * | filter | Filter to apply to profile searches. |
| rlm_ldap_t const * | inst | |
| char const *const * | next | Next profile DN to search for (search_mode = seq). |
| fr_ldap_query_t * | query | |
| fr_ldap_result_code_t * | ret | Result of the query and applying the map. |
| fr_ldap_thread_trunk_t * | ttrunk | Trunk used for profile searches. |
|
static |
|
static |
Apply the attribute map to a single profile entry.
| [out] | fallthrough | Whether processing should continue to the next profile entry. |
| [in] | request | Current request. |
| [in] | profile_ctx | Profile lookup state. |
| [in] | handle | libldap handle the result was received on. |
| [in] | entry | Profile object to apply. |
Definition at line 64 of file profile.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Push the resume frame and start the first profile search.
Cancellation is handled by the frame fr_ldap_trunk_search pushes above this one, which abandons the in-flight query and detaches it from the trunk request before the unwind frees profile_ctx.
Definition at line 232 of file profile.c.
Here is the call graph for this function:
Here is the caller graph for this function:| unlang_action_t rlm_ldap_map_profile | ( | fr_ldap_result_code_t * | ret, |
| int * | applied, | ||
| rlm_ldap_t const * | inst, | ||
| request_t * | request, | ||
| fr_ldap_thread_trunk_t * | ttrunk, | ||
| char const * | dn, | ||
| int | scope, | ||
| char const * | filter, | ||
| fr_ldap_map_exp_t const * | expanded | ||
| ) |
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.
| [out] | ret | Where to write the result of the query. |
| [out] | applied | Where to write the number of profiles applied. |
| [in] | inst | LDAP module instance. |
| [in] | request | Current request. |
| [in] | ttrunk | Trunk connection on which to run LDAP queries. |
| [in] | dn | of profile object to apply. |
| [in] | scope | to apply when looking up profiles. |
| [in] | filter | to apply when looking up profiles. |
| [in] | expanded | Structure containing a list of xlat expanded attribute names and mapping information. |
Definition at line 269 of file profile.c.
Here is the call graph for this function:
Here is the caller graph for this function:| unlang_action_t rlm_ldap_map_profiles | ( | fr_ldap_result_code_t * | ret, |
| int * | applied, | ||
| rlm_ldap_t const * | inst, | ||
| request_t * | request, | ||
| fr_ldap_thread_trunk_t * | ttrunk, | ||
| char const *const * | dn_list, | ||
| char const * | filter, | ||
| fr_ldap_map_exp_t const * | expanded | ||
| ) |
Search for and apply a set of LDAP profiles.
With search_mode = bulk, a single search retrieves every profile object, matching entries by DN using the attribute configured (or detected) for the directory, and profiles are applied in result order. With search_mode = seq, one search is run per profile DN, applied in list order.
| [out] | ret | Where to write the result of the last query. |
| [out] | applied | Incremented by the number of profile maps applied. |
| [in] | inst | LDAP module instance. |
| [in] | request | Current request. |
| [in] | ttrunk | Trunk connection on which to run LDAP queries. |
| [in] | dn_list | NULL terminated list of profile object DNs to apply, in application order (default profile first). Must contain at least one DN, and no empty strings. |
| [in] | filter | to apply when looking up profiles. |
| [in] | expanded | Structure containing a list of xlat expanded attribute names and mapping information. |
Definition at line 311 of file profile.c.
Here is the call graph for this function:
Here is the caller graph for this function:
1.9.8