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

Functions to perform SASL binds against an LDAP directory. More...

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

Go to the source code of this file.

Data Structures

struct  rlm_ldap_sasl_ctx
 Data passed to the _sasl interact callback. More...
 

Typedefs

typedef struct rlm_ldap_sasl_ctx rlm_ldap_sasl_ctx_t
 Data passed to the _sasl interact callback. More...
 

Functions

static int _sasl_interact (UNUSED LDAP *handle, UNUSED unsigned flags, void *ctx, void *sasl_callbacks)
 Callback for ldap_sasl_interactive_bind. More...
 
ldap_rcode_t rlm_ldap_sasl_interactive (rlm_ldap_t const *inst, REQUEST *request, ldap_handle_t *conn, char const *identity, char const *password, ldap_sasl *sasl, LDAPControl **serverctrls, LDAPControl **clientctrls, char const **error, char **extra)
 Initiate an LDAP interactive bind. More...
 

Detailed Description

Functions to perform SASL binds against an LDAP directory.

Id:
04af92c82870f791347122dd74376eb6b6493ec8
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 sasl.c.


Data Structure Documentation

struct rlm_ldap_sasl_ctx

Data passed to the _sasl interact callback.

Definition at line 36 of file sasl.c.

+ Collaboration diagram for rlm_ldap_sasl_ctx:
Data Fields
ldap_sasl * extra Extra fields (realm and proxy id).
char const * identity User's DN or identity.
rlm_ldap_t const * inst LDAP instance.
char const * password Bind password.
REQUEST * request The current request.

Typedef Documentation

Data passed to the _sasl interact callback.

Function Documentation

static int _sasl_interact ( UNUSED LDAP *  handle,
UNUSED unsigned  flags,
void *  ctx,
void *  sasl_callbacks 
)
static

Callback for ldap_sasl_interactive_bind.

Parameters
handleused for the SASL bind.
flagsdata as provided to ldap_sasl_interactive_bind.
ctxOur context data, containing the identity, password, realm and various other things.
sasl_callbacksArray of challenges to provide responses for.
Returns
SASL_OK.

Definition at line 54 of file sasl.c.

+ Here is the caller graph for this function:

ldap_rcode_t rlm_ldap_sasl_interactive ( rlm_ldap_t const *  inst,
REQUEST request,
ldap_handle_t conn,
char const *  identity,
char const *  password,
ldap_sasl sasl,
LDAPControl **  serverctrls,
LDAPControl **  clientctrls,
char const **  error,
char **  extra 
)

Initiate an LDAP interactive bind.

Parameters
[in]instrlm_ldap configuration.
[in]requestCurrent request, this may be NULL, in which case all debug logging is done with radlog.
[in]connto use. May change as this function calls functions which auto re-connect.
[in]identityof the user.
[in]passwordof the user.
[in]saslmechanism to use for bind, and additional parameters.
[in]serverctrlsSearch controls to pass to the server. May be NULL.
[in]clientctrlsSearch controls for ldap_sasl_interactive. May be NULL.
[out]errormessage resulting from bind.
[out]extrainformation about the error.
Returns
One of the LDAP_PROC_* (ldap_rcode_t) values.

Definition at line 105 of file sasl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: