LDAP sync protocol handler.
More...
#include <freeradius-devel/internal/internal.h>
#include <freeradius-devel/io/listen.h>
#include <freeradius-devel/server/module.h>
#include "proto_ldap_sync.h"
#include <fcntl.h>
Go to the source code of this file.
|
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...
|
|
static int | mod_bootstrap (module_inst_ctx_t const *mctx) |
|
static int | mod_decode (UNUSED void const *instance, request_t *request, uint8_t *const data, size_t data_len) |
| Decode an internal LDAP sync packet. More...
|
|
static ssize_t | mod_encode (UNUSED void const *instance, request_t *request, uint8_t *buffer, size_t buffer_len) |
| Encode responses to processing LDAP sync sections. More...
|
|
static int | mod_instantiate (module_inst_ctx_t const *mctx) |
|
static int | mod_open (void *instance, fr_schedule_t *sc, UNUSED CONF_SECTION *conf) |
|
static int | transport_parse (TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, conf_parser_t const *rule) |
|
static int | transport_parse (TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED conf_parser_t const *rule) |
| Wrapper around dl_instance. More...
|
|
LDAP sync protocol handler.
- Id
- 809c26d3763dfe3663acef7a8349accc4b1cb7c8
- Copyright
- 2022 Network RADIUS SAS (legal.nosp@m.@net.nosp@m.workr.nosp@m.adiu.nosp@m.s.com)
Definition in file proto_ldap_sync.c.
◆ LOG_PREFIX
#define LOG_PREFIX "proto_ldap_sync" |
◆ ldap_sync_conf_attr_add()
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.
- Parameters
-
[in,out] | config | to check for attribute. |
[in] | attr | to look for. |
- Returns
- 1 if attr is added
- 0 if attr was already present
Definition at line 147 of file proto_ldap_sync.c.
◆ mod_bootstrap()
◆ mod_decode()
◆ mod_encode()
Encode responses to processing LDAP sync sections.
Definition at line 198 of file proto_ldap_sync.c.
◆ mod_instantiate()
◆ mod_open()
◆ transport_parse() [1/2]
◆ transport_parse() [2/2]
Wrapper around dl_instance.
- Parameters
-
[in] | ctx | to allocate data in (instance of proto_dns). |
[out] | out | Where to write a dl_module_inst_t containing the module handle and instance. |
[in] | parent | Base structure address. |
[in] | ci | CONF_PAIR specifying the name of the type module. |
[in] | rule | unused. |
- Returns
- 0 on success.
- -1 on failure.
Definition at line 109 of file proto_ldap_sync.c.
◆ attr_ldap_sync
◆ attr_ldap_sync_cookie
◆ attr_ldap_sync_dn
◆ attr_ldap_sync_filter
◆ attr_ldap_sync_packet_id
◆ attr_ldap_sync_scope
◆ attr_packet_type
◆ dict_ldap_sync
◆ encode_ctx
◆ ldap_sync_search_config
Initial value:= {
}
#define CONF_PARSER_TERMINATOR
#define FR_CONF_OFFSET(_name, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
Areas of the directory to receive notifications for.
Definition at line 40 of file proto_ldap_sync.c.
◆ proto_ldap_sync
Initial value:= {
.common = {
.name = "ldap_sync",
},
}
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
static ssize_t mod_encode(UNUSED void const *instance, request_t *request, uint8_t *buffer, size_t buffer_len)
Encode responses to processing LDAP sync sections.
static fr_dict_t const * dict_ldap_sync
static conf_parser_t const proto_ldap_sync_config[]
static int mod_bootstrap(module_inst_ctx_t const *mctx)
static int mod_decode(UNUSED void const *instance, request_t *request, uint8_t *const data, size_t data_len)
Decode an internal LDAP sync packet.
static int mod_instantiate(module_inst_ctx_t const *mctx)
static int mod_open(void *instance, fr_schedule_t *sc, UNUSED CONF_SECTION *conf)
An instance of a proto_ldap_sync listen section.
static int instantiate(module_inst_ctx_t const *mctx)
Definition at line 441 of file proto_ldap_sync.c.
◆ proto_ldap_sync_config
Initial value:= {
}
#define FR_CONF_SUBSECTION_ALLOC(_name, _type, _flags, _struct, _field, _subcs)
A conf_parser_t multi-subsection.
@ CONF_FLAG_REQUIRED
Error out if no matching CONF_PAIR is found, and no dflt value is set.
@ CONF_FLAG_MULTI
CONF_PAIR can have multiple copies.
@ CONF_FLAG_SUBSECTION
Instead of putting the information into a configuration structure, the configuration file routines MA...
#define FR_CONF_OFFSET_TYPE_FLAGS(_name, _type, _flags, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
static conf_parser_t const ldap_sync_search_config[]
static int transport_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, conf_parser_t const *rule)
Definition at line 52 of file proto_ldap_sync.c.
◆ proto_ldap_sync_dict
◆ proto_ldap_sync_dict_attr
Initial value:= {
{ NULL }
}
@ FR_TYPE_TLV
Contains nested attributes.
@ FR_TYPE_STRING
String of printable characters.
@ FR_TYPE_UINT32
32 Bit unsigned integer.
@ FR_TYPE_OCTETS
Raw octets.
static fr_dict_attr_t const * attr_ldap_sync_filter
static fr_dict_attr_t const * attr_packet_type
static fr_dict_attr_t const * attr_ldap_sync_packet_id
static fr_dict_attr_t const * attr_ldap_sync_dn
static fr_dict_attr_t const * attr_ldap_sync
static fr_dict_attr_t const * attr_ldap_sync_scope
static fr_dict_attr_t const * attr_ldap_sync_cookie
Definition at line 87 of file proto_ldap_sync.c.