The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
Functions
bind.c File Reference

Asynchronous bind functions for LDAP. More...

#include <freeradius-devel/ldap/base.h>
#include <freeradius-devel/util/debug.h>
+ Include dependency graph for bind.c:

Go to the source code of this file.

Functions

static USES_APPLE_DEPRECATED_API void _ldap_bind_io_error (UNUSED fr_event_list_t *el, UNUSED int fd, UNUSED int flags, UNUSED int fd_errno, void *uctx)
 Error reading from or writing to the file descriptor.
 
static void _ldap_bind_io_read (UNUSED fr_event_list_t *el, UNUSED int fd, UNUSED int flags, void *uctx)
 Parse a bind response from a server.
 
static void _ldap_bind_io_write (fr_event_list_t *el, int fd, UNUSED int flags, void *uctx)
 Send a bind request to a server.
 
int fr_ldap_bind_async (fr_ldap_connection_t *c, char const *bind_dn, char const *password, LDAPControl **serverctrls, LDAPControl **clientctrls)
 Install I/O handlers for the bind operation.
 
unlang_action_t fr_ldap_bind_auth_async (unlang_result_t *p_result, request_t *request, fr_ldap_thread_t *thread, char const *bind_dn, char const *password)
 Initiate an async LDAP bind for authentication.
 
static void ldap_async_auth_bind_cancel (request_t *request, UNUSED fr_signal_t action, void *uctx)
 Signal an outstanding LDAP bind request to cancel.
 
static unlang_action_t ldap_async_auth_bind_results (unlang_result_t *p_result, request_t *request, void *uctx)
 Handle the return code from parsed LDAP results to set the module rcode.
 
static unlang_action_t ldap_async_auth_bind_start (UNUSED unlang_result_t *p_result, UNUSED request_t *request, UNUSED void *uctx)
 Yield interpreter after queueing LDAP bind.
 

Detailed Description

Asynchronous bind functions for LDAP.

Asynchronous SASL bind functions for LDAP.

Id
b8047434be04b4df5d961b63a10e55f212efa1cf
Id
af6a20e033e982214a89350cfe908f5c47474cab

Definition in file bind.c.

Function Documentation

◆ _ldap_bind_io_error()

static USES_APPLE_DEPRECATED_API void _ldap_bind_io_error ( UNUSED fr_event_list_t el,
UNUSED int  fd,
UNUSED int  flags,
UNUSED int  fd_errno,
void *  uctx 
)
static

Error reading from or writing to the file descriptor.

Parameters
[in]elthe event occurred in.
[in]fdthe event occurred on.
[in]flagsfrom kevent.
[in]fd_errnoThe error that occurred.
[in]uctxConnection config and handle.

Definition at line 39 of file bind.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _ldap_bind_io_read()

static void _ldap_bind_io_read ( UNUSED fr_event_list_t el,
UNUSED int  fd,
UNUSED int  flags,
void *  uctx 
)
static

Parse a bind response from a server.

Parameters
[in]elthe event occurred in.
[in]fdthe event occurred on.
[in]flagsfrom kevent.
[in]uctxbind_ctx containing credentials, and connection config/handle.

Definition at line 56 of file bind.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _ldap_bind_io_write()

static void _ldap_bind_io_write ( fr_event_list_t el,
int  fd,
UNUSED int  flags,
void *  uctx 
)
static

Send a bind request to a server.

Parameters
[in]elthe event occurred in.
[in]fdthe event occurred on.
[in]flagsfrom kevent.
[in]uctxbind_ctx containing credentials, and connection config/handle.

Definition at line 96 of file bind.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_ldap_bind_async()

int fr_ldap_bind_async ( fr_ldap_connection_t c,
char const *  bind_dn,
char const *  password,
LDAPControl **  serverctrls,
LDAPControl **  clientctrls 
)

Install I/O handlers for the bind operation.

Parameters
[in]cconnection to StartTLS on.
[in]bind_dnIdentity to bind with.
[in]passwordPassword to bind with.
[in]serverctrlsExtra controls to pass to the server.
[in]clientctrlsExtra controls to pass to libldap.
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 185 of file bind.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_ldap_bind_auth_async()

unlang_action_t fr_ldap_bind_auth_async ( unlang_result_t p_result,
request_t request,
fr_ldap_thread_t thread,
char const *  bind_dn,
char const *  password 
)

Initiate an async LDAP bind for authentication.

Parameters
[out]p_resultWhere to write the result of the bind operation. If this is NULL, the rcode result will be discarded.
  • LDAP_PROC_SUCCES = RLM_MODULE_OK,
  • LDAP_PROC_NOT_PERMITTED = RLM_MODULE_DISALLOW,
  • LDAP_PROC_REJECT = RLM_MODULE_REJECT,
  • LDAP_PROC_BAD_DN = RLM_MODULE_INVALID,
  • LDAP_PROC_NO_RESULT = RLM_MODULE_NOTFOUND
  • * = RLM_MODULE_FAIL.
[in]requestthis bind relates to.
[in]threadwhose connection the bind should be performed on.
[in]bind_dnIdentity to bind with.
[in]passwordPassword to bind with.
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 326 of file bind.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ldap_async_auth_bind_cancel()

static void ldap_async_auth_bind_cancel ( request_t request,
UNUSED fr_signal_t  action,
void *  uctx 
)
static

Signal an outstanding LDAP bind request to cancel.

Definition at line 299 of file bind.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ldap_async_auth_bind_results()

static unlang_action_t ldap_async_auth_bind_results ( unlang_result_t p_result,
request_t request,
void *  uctx 
)
static

Handle the return code from parsed LDAP results to set the module rcode.

Definition at line 247 of file bind.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ldap_async_auth_bind_start()

static unlang_action_t ldap_async_auth_bind_start ( UNUSED unlang_result_t p_result,
UNUSED request_t request,
UNUSED void *  uctx 
)
static

Yield interpreter after queueing LDAP bind.

Definition at line 239 of file bind.c.

+ Here is the caller graph for this function: