24#define LOG_PREFIX "process_ldap_sync"
26#include <freeradius-devel/unlang/interpret.h>
27#include <freeradius-devel/server/protocol.h>
28#include <freeradius-devel/util/debug.h>
29#include <freeradius-devel/ldap/sync.h>
56 "Cookie-Load-Response",
58 "Cookie-Store-Response",
68 received ?
"Received" :
"Sending",
98#define PROCESS_PACKET_TYPE fr_ldap_sync_packet_code_t
99#define PROCESS_CODE_MAX FR_LDAP_SYNC_CODE_MAX
100#define PROCESS_PACKET_CODE_VALID FR_LDAP_SYNC_PACKET_CODE_VALID
101#define PROCESS_INST process_ldap_sync_t
102#include <freeradius-devel/server/process.h>
107 fr_process_state_t
const *state;
115 request->component =
"ldap_sync";
116 request->module = NULL;
119 UPDATE_STATE(packet);
123 return state->recv(p_result, mctx, request);
130 .recv = recv_generic,
131 .resume = resume_recv_generic,
137 .recv = recv_generic,
138 .resume = resume_recv_generic,
144 .recv = recv_generic,
145 .resume = resume_recv_generic,
151 .recv = recv_generic,
152 .resume = resume_recv_generic,
157 .send = send_generic,
158 .resume = resume_send_generic,
170 .recv = recv_generic,
171 .resume = resume_recv_generic,
176 .send = send_generic,
177 .resume = resume_send_generic,
181 .send = send_generic,
182 .resume = resume_send_generic
187 .recv = recv_generic,
188 .resume = resume_recv_generic,
193 .send = send_generic,
194 .resume = resume_send_generic,
237 .name =
"process_ldap_sync",
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
A section grouping multiple CONF_PAIR.
fr_dict_attr_t const ** out
Where to write a pointer to the resolved fr_dict_attr_t.
fr_dict_t const ** out
Where to write a pointer to the loaded/resolved fr_dict_t.
Specifies an attribute which must be present for the module to function.
Specifies a dictionary which must be loaded/loadable for the module to function.
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
fr_dict_attr_t const * attr_packet_type
void log_request(fr_log_type_t type, fr_log_lvl_t lvl, request_t *request, char const *file, int line, char const *fmt,...)
Marshal variadic log arguments into a va_list and pass to normal logging functions.
void log_request_pair_list(fr_log_lvl_t lvl, request_t *request, fr_pair_t const *parent, fr_pair_list_t const *vps, char const *prefix)
Print a fr_pair_list_t.
@ L_DBG_LVL_1
Highest priority debug messages (-x).
@ L_DBG_LVL_2
2nd highest priority debug messages (-xx | -X).
@ L_DBG
Only displayed when debugging is enabled.
@ FR_TYPE_UINT32
32 Bit unsigned integer.
unlang_mod_actions_t const mod_actions_authorize
unlang_mod_action_t actions[RLM_MODULE_NUMCODES]
module_instance_t const * mi
Instance of the module being instantiated.
Temporary structure to hold arguments for module calls.
static unlang_action_t mod_process(unlang_result_t *p_result, module_ctx_t const *mctx, request_t *request)
static const virtual_server_compile_t compile_list[]
static fr_process_state_t const process_state[]
CONF_SECTION * recv_delete
fr_dict_autoload_t process_ldap_sync_dict[]
static fr_dict_t const * dict_ldap_sync
CONF_SECTION * recv_modify
process_ldap_sync_sections_t sections
fr_dict_attr_autoload_t process_ldap_sync_dict_attr[]
static char const * ldap_sync_message_types[FR_LDAP_SYNC_CODE_MAX]
static void ldap_sync_packet_debug(request_t *request, fr_packet_t *packet, fr_pair_list_t *list, bool received)
CONF_SECTION * store_cookie
fr_process_module_t process_ldap_sync
CONF_SECTION * recv_present
CONF_SECTION * load_cookie
#define PROCESS_TRACE
Trace each state function as it's entered.
#define PROCESS_CONF_OFFSET(_x)
module_t common
Common fields for all loadable modules.
Common public symbol definition for all process modules.
@ RLM_MODULE_INVALID
The module considers the request invalid.
@ RLM_MODULE_FAIL
Module failed, don't reply.
@ RLM_MODULE_DISALLOW
Reject the request (user is locked out).
@ RLM_MODULE_REJECT
Immediately reject the request.
@ RLM_MODULE_TIMEOUT
Module (or section) timed out.
@ RLM_MODULE_NOOP
Module succeeded without doing anything.
#define SECTION_NAME(_name1, _name2)
Define a section name consisting of a verb and a noun.
void * data
Module's instance data.
#define MODULE_RCTX(_ctype)
#define MODULE_INST(_ctype)
#define FR_LDAP_SYNC_PACKET_CODE_VALID(_code)
@ FR_LDAP_SYNC_CODE_PRESENT
LDAP server indicates a particular object is present and unchanged.
@ FR_LDAP_SYNC_CODE_COOKIE_STORE_RESPONSE
Response to storing the new cookie.
@ FR_LDAP_SYNC_CODE_ENTRY_RESPONSE
Response packet to present / add / modify / delete.
@ FR_LDAP_SYNC_CODE_COOKIE_LOAD_FAIL
Response when coolie load fails.
@ FR_LDAP_SYNC_CODE_ADD
Object has been added to the LDAP directory.
@ FR_LDAP_SYNC_CODE_COOKIE_STORE
The server has sent a new cookie.
@ FR_LDAP_SYNC_CODE_COOKIE_LOAD_RESPONSE
Response with the returned cookie.
@ FR_LDAP_SYNC_CODE_DELETE
Object has been deleted.
@ FR_LDAP_SYNC_CODE_COOKIE_LOAD
Before the sync starts, request any previously stored cookie.
@ FR_LDAP_SYNC_CODE_MODIFY
Object has been modified.
#define talloc_get_type_abort_const
unsigned int code
Packet code (type).
section_name_t const * section
Identifier for the section.
#define COMPILE_TERMINATOR
Processing sections which are allowed in this virtual server.