The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
#include <freeradius-devel/io/master.h>
#include <freeradius-devel/ldap/base.h>
#include <freeradius-devel/ldap/sync.h>
Go to the source code of this file.
Data Structures | |
struct | proto_ldap_sync_t |
An instance of a proto_ldap_sync listen section. More... | |
struct | sync_config_s |
Areas of the directory to receive notifications for. More... | |
Typedefs | |
typedef struct sync_config_s | sync_config_t |
typedef int(* | sync_init_t) (fr_ldap_connection_t *conn, size_t sync_no, proto_ldap_sync_t const *inst, uint8_t const *cookie) |
Allocate and initialise a sync query. More... | |
typedef int(* | sync_msg_t) (sync_state_t *sync, LDAPMessage *msg, LDAPControl **ctrls) |
Received an LDAP message related to a sync. More... | |
typedef struct sync_state_s | sync_state_t |
Enumerations | |
enum | sync_op_t { SYNC_OP_INVALID = -1 , SYNC_OP_PRESENT = 0 , SYNC_OP_ADD = 1 , SYNC_OP_MODIFY = 2 , SYNC_OP_DELETE = 3 } |
Operations to perform on entries. More... | |
Functions | |
int | ldap_sync_conf_attr_add (sync_config_t *config, char const *attr) |
Check if an attribute is in the config list and add if not present. More... | |
struct proto_ldap_sync_t |
An instance of a proto_ldap_sync listen section.
Definition at line 35 of file proto_ldap_sync.h.
Data Fields | ||
---|---|---|
fr_app_io_t const * | app_io | Easy access to the app_io handle. |
CONF_SECTION * | app_io_conf | Easy access to the app_io's configuration. |
void * | app_io_instance | Easy access to the app_io_instance. |
uint32_t | cookie_changes | Number of LDAP changes to process between each cookie store operation. |
fr_time_delta_t | cookie_interval | Interval between storing cookies. |
CONF_SECTION * | cs | my configuration. |
fr_dict_t * | dict | root dictionary |
module_instance_t * | io_submodule |
As provided by the transport_parse callback. Broken out into the app_io_* fields below for convenience. |
fr_listen_t * | listen | The listener structure which describes the I/O path. |
uint32_t | max_packet_size | for message ring buffer |
uint32_t | num_messages | for message ring buffer |
uint32_t | priority | for packet processing. |
fr_time_delta_t | retry_interval | Interval between retrying failed change packets. |
fr_schedule_t * | sc | |
fr_app_t * | self | child / parent linking issues |
CONF_SECTION * | server_cs | server CS for this listener. |
sync_config_t ** | sync_config | DNs and filters to monitor. |
struct sync_config_s |
Areas of the directory to receive notifications for.
Definition at line 116 of file proto_ldap_sync.h.
Data Fields | ||
---|---|---|
char const ** | attrs | Zero terminated attribute array. |
char const * | base_dn | DN to search for users under. |
bool | changes_only |
Do we only want changes, or do we want a full directory load. Not supported by Active Directory. |
CONF_SECTION * | cs |
Config section where this sync was defined. Used for logging. |
sync_msg_t | entry | Called when we receive a searchEntry message. |
map_list_t | entry_map | How to convert attributes in entries to FreeRADIUS attributes. |
fr_event_timer_t const * | ev | Event for retrying cookie load. |
char const * | filter | Filter to retrieve only user objects. |
sync_init_t | init | Called to initialise a new search. |
sync_msg_t | intermediate | Called when we receive a syncIntermediate message. |
sync_msg_t | reference | Called when we receive a searchReference message. |
sync_msg_t | refresh | Called when we receive a eSyncRefreshRequired code. |
char const * | root_dn | The root DN for the directory. |
int | scope | Scope as its libldap value. |
char const * | scope_str | Scope (sub, one, base). |
fr_pair_list_t | sync_pairs | Pairs representing the sync config sent to the worker with each request. |
void * | user_ctx | User ctx to pass to the callbacks. |
typedef struct sync_config_s sync_config_t |
Definition at line 1 of file proto_ldap_sync.h.
typedef int(* sync_init_t) (fr_ldap_connection_t *conn, size_t sync_no, proto_ldap_sync_t const *inst, uint8_t const *cookie) |
Allocate and initialise a sync query.
Called at the start of the sync operation, after any cookie has been retrieved.
Sends the persistent search query to the LDAP server with the appropriate controls for type of directory in use.
[in] | conn | to initialise the sync on |
[in] | sync_no | number of the sync in the array of configs. |
[in] | inst | instance of ldap_sync this query relates to |
[in] | cookie | to send with the query (RFC 4533 only) |
Definition at line 95 of file proto_ldap_sync.h.
typedef int(* sync_msg_t) (sync_state_t *sync, LDAPMessage *msg, LDAPControl **ctrls) |
Received an LDAP message related to a sync.
Called whenever the server returns a message, during any phase of the sync.
This function is responsible for freeing the LDAP message.
[in] | sync | we received the message for. |
[in] | msg | the LDAP message received. |
[in] | ctrls | received with the message. |
Definition at line 111 of file proto_ldap_sync.h.
typedef struct sync_state_s sync_state_t |
Definition at line 1 of file proto_ldap_sync.h.
enum sync_op_t |
Operations to perform on entries.
Definition at line 70 of file proto_ldap_sync.h.
int ldap_sync_conf_attr_add | ( | sync_config_t * | config, |
char const * | attr | ||
) |
Check if an attribute is in the config list and add if not present.
[in,out] | config | to check for attribute. |
[in] | attr | to look for. |
Definition at line 104 of file proto_ldap_sync.c.