All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Functions
clients.c File Reference

LDAP module dynamic clients. More...

#include <freeradius-devel/rad_assert.h>
#include <ctype.h>
#include "ldap.h"
+ Include dependency graph for clients.c:

Go to the source code of this file.

Data Structures

struct  ldap_client_data
 

Typedefs

typedef struct ldap_client_data ldap_client_data_t
 

Functions

static int _get_client_value (char **out, CONF_PAIR const *cp, void *data)
 
static int rlm_ldap_client_get_attrs (char const **values, int *idx, CONF_SECTION const *cs)
 Iterate over pairs in mapping section recording their values in an array. More...
 
int rlm_ldap_client_load (rlm_ldap_t const *inst, CONF_SECTION *tmpl, CONF_SECTION *map)
 Load clients from LDAP on server start. More...
 

Detailed Description

LDAP module dynamic clients.

Id:
1b8f10c2a87e88a46c0977edd5b77cef0e766417
Author
Arran Cudbard-Bell a.cud.nosp@m.bard.nosp@m.b@fre.nosp@m.erad.nosp@m.ius.o.nosp@m.rg

Definition in file clients.c.


Data Structure Documentation

struct ldap_client_data

Definition at line 70 of file clients.c.

+ Collaboration diagram for ldap_client_data:
Data Fields
ldap_handle_t * conn
LDAPMessage * entry

Typedef Documentation

Function Documentation

static int _get_client_value ( char **  out,
CONF_PAIR const *  cp,
void *  data 
)
static

Definition at line 75 of file clients.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int rlm_ldap_client_get_attrs ( char const **  values,
int *  idx,
CONF_SECTION const *  cs 
)
static

Iterate over pairs in mapping section recording their values in an array.

This array is the list of attributes we retrieve from LDAP, and is NULL terminated.

If we hit a CONF_SECTION we recurse and process its CONF_PAIRS too.

Parameters
[out]valuesarray of char pointers.
[in,out]idxrecords current array offset.
[in]csto iterate over.
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 45 of file clients.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int rlm_ldap_client_load ( rlm_ldap_t const *  inst,
CONF_SECTION tmpl,
CONF_SECTION map 
)

Load clients from LDAP on server start.

Parameters
[in]instrlm_ldap configuration.
[in]tmplto use as the base for the new client.
[in]mapto load client attribute/LDAP attribute mappings from.
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 102 of file clients.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: