24 #define LOG_PREFIX "process_ldap_sync"
26 #include <freeradius-devel/server/protocol.h>
27 #include <freeradius-devel/util/debug.h>
28 #include <freeradius-devel/ldap/sync.h>
55 "Cookie-Load-Response",
57 "Cookie-Store-Response",
67 received ?
"Received" :
"Sending",
97 #define PROCESS_PACKET_TYPE fr_ldap_sync_packet_code_t
98 #define PROCESS_CODE_MAX FR_LDAP_SYNC_CODE_MAX
99 #define PROCESS_PACKET_CODE_VALID FR_LDAP_SYNC_PACKET_CODE_VALID
100 #define PROCESS_INST process_ldap_sync_t
101 #include <freeradius-devel/server/process.h>
106 fr_process_state_t
const *state;
114 request->component =
"ldap_sync";
115 request->module = NULL;
118 UPDATE_STATE(packet);
122 return state->recv(p_result, mctx, request);
129 .recv = recv_generic,
130 .resume = resume_recv_generic,
136 .recv = recv_generic,
137 .resume = resume_recv_generic,
143 .recv = recv_generic,
144 .resume = resume_recv_generic,
150 .recv = recv_generic,
151 .resume = resume_recv_generic,
156 .send = send_generic,
157 .resume = resume_send_generic,
168 .recv = recv_generic,
169 .resume = resume_recv_generic,
174 .send = send_generic,
175 .resume = resume_send_generic,
179 .send = send_generic,
180 .resume = resume_send_generic
185 .recv = recv_generic,
186 .resume = resume_recv_generic,
191 .send = send_generic,
192 .resume = resume_send_generic,
200 .offset = PROCESS_CONF_OFFSET(load_cookie)
205 .offset = PROCESS_CONF_OFFSET(store_cookie)
210 .offset = PROCESS_CONF_OFFSET(recv_add)
215 .offset = PROCESS_CONF_OFFSET(recv_present)
220 .offset = PROCESS_CONF_OFFSET(recv_delete)
225 .offset = PROCESS_CONF_OFFSET(recv_modify)
235 .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
module_instance_t const * mi
Instance of the module being instantiated.
Temporary structure to hold arguments for module calls.
CONF_SECTION * recv_delete
static unlang_action_t mod_process(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
static virtual_server_compile_t const compile_list[]
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 fr_process_state_t const process_state[]
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.
module_t common
Common fields for all loadable modules.
Common public symbol definition for all process modules.
rlm_rcode_t
Return codes indicating the result of the module call.
@ 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_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 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).
#define COMPILE_TERMINATOR
section_name_t const * section
Identifier for the section.
Processing sections which are allowed in this virtual server.