All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
attrmap.c File Reference
#include <freeradius-devel/rad_assert.h>
#include "ldap.h"
+ Include dependency graph for attrmap.c:

Go to the source code of this file.

Functions

int rlm_ldap_map_do (const rlm_ldap_t *inst, REQUEST *request, LDAP *handle, rlm_ldap_map_exp_t const *expanded, LDAPMessage *entry)
 Convert attribute map into valuepairs. More...
 
int rlm_ldap_map_expand (rlm_ldap_map_exp_t *expanded, REQUEST *request, vp_map_t const *maps)
 Expand values in an attribute map where needed. More...
 
int rlm_ldap_map_getvalue (TALLOC_CTX *ctx, VALUE_PAIR **out, REQUEST *request, vp_map_t const *map, void *uctx)
 Callback for map_to_request. More...
 
int rlm_ldap_map_verify (vp_map_t *map, void *instance)
 

Function Documentation

int rlm_ldap_map_do ( const rlm_ldap_t inst,
REQUEST request,
LDAP *  handle,
rlm_ldap_map_exp_t const *  expanded,
LDAPMessage *  entry 
)

Convert attribute map into valuepairs.

Use the attribute map built earlier to convert LDAP values into valuepairs and insert them into whichever list they need to go into.

This is NOT atomic, but there's no condition for which we should error out...

Parameters
[in]instrlm_ldap configuration.
[in]requestCurrent request.
[in]handleassociated with entry.
[in]expandedattributes (rhs of map).
[in]entryto retrieve attributes from.
Returns
  • Number of maps successfully applied.
  • -1 on failure.

Definition at line 302 of file attrmap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int rlm_ldap_map_expand ( rlm_ldap_map_exp_t expanded,
REQUEST request,
vp_map_t const *  maps 
)

Expand values in an attribute map where needed.

Parameters
[out]expandedarray of attributes. Need not be initialised (we'll initialise).
[in]requestThe current request.
[in]mapsto expand.
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 251 of file attrmap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int rlm_ldap_map_getvalue ( TALLOC_CTX *  ctx,
VALUE_PAIR **  out,
REQUEST request,
vp_map_t const *  map,
void *  uctx 
)

Callback for map_to_request.

Performs exactly the same job as map_to_vp, but pulls attribute values from LDAP entries

See Also
map_to_vp

Definition at line 36 of file attrmap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int rlm_ldap_map_verify ( vp_map_t map,
void *  instance 
)

Definition at line 146 of file attrmap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: