24 RCSID(
"$Id: ac51afa4f7bf1e3207400f372aa5009d3d2063cc $")
26 #include <freeradius-devel/eap/base.h>
27 #include <freeradius-devel/util/debug.h>
28 #include <freeradius-devel/server/virtual_servers.h>
29 #include <freeradius-devel/server/pair.h>
30 #include <freeradius-devel/unlang/call.h>
31 #include <freeradius-devel/unlang/interpret.h>
152 REDEBUG(
"Response is too large to understand");
163 vp->vp_tainted =
true;
168 RDEBUG2(
"authenticate %s { ... } sub-section not found.",
169 inst->auth_type->name);
184 char challenge_str[1024];
189 if (
xlat_eval(challenge_str,
sizeof(challenge_str), request,
inst->challenge, NULL, NULL) < 0) {
193 length = strlen(challenge_str);
232 .clone_parent_lists =
true
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
CONF_SECTION * unlang_call_current(request_t *request)
Return the last virtual server that was called.
#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
#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
Defines a CONF_PAIR to C data type mapping.
Common header for all CONF_* types.
A section grouping multiple CONF_PAIR.
CONF_PAIR * cf_item_to_pair(CONF_ITEM const *ci)
Cast a CONF_ITEM to a CONF_PAIR.
CONF_SECTION * cf_section_find(CONF_SECTION const *cs, char const *name1, char const *name2)
Find a CONF_SECTION with name1 and optionally name2.
char const * cf_pair_value(CONF_PAIR const *pair)
Return the value of a CONF_PAIR.
#define cf_log_err(_cf, _fmt,...)
eap_packet_t * response
Packet we received from the peer.
eap_packet_t * request
Packet we will send to the peer.
Contains a pair of request and response packets.
fr_dict_attr_t * fr_dict_attr_unconst(fr_dict_attr_t const *da)
Coerce to non-const.
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.
int fr_dict_enum_add_name_next(fr_dict_attr_t *da, char const *name)
Add an name to an integer attribute hashing the name for the integer value.
fr_dict_enum_value_t * fr_dict_enum_by_name(fr_dict_attr_t const *da, char const *name, ssize_t len)
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.
Value of an enumerated attribute.
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
rlm_rcode_t unlang_interpret_stack_result(request_t *request)
Get the current rcode for the frame.
module_method_t process
Callback that should be used to process the next round.
eap_round_t * this_round
The EAP response we're processing, and the EAP request we're building.
static eap_session_t * eap_session_get(request_t *request)
Tracks the progress of a single session of any EAP method.
@ FR_TYPE_STRING
String of printable characters.
@ FR_TYPE_UINT32
32 Bit unsigned integer.
ssize_t xlat_eval(char *out, size_t outlen, request_t *request, char const *fmt, xlat_escape_legacy_t escape, void const *escape_ctx)
module_instance_t const * mi
Instance of the module being instantiated.
void * rctx
Resume ctx that a module previously set.
Temporary structure to hold arguments for module calls.
int fr_pair_value_bstrndup(fr_pair_t *vp, char const *src, size_t len, bool tainted)
Copy data into a "string" type value pair.
static const conf_parser_t config[]
#define pair_update_request(_attr, _da)
#define RETURN_MODULE_RCODE(_rcode)
#define RETURN_MODULE_HANDLED
#define RETURN_MODULE_INVALID
rlm_rcode_t
Return codes indicating the result of the module call.
@ RLM_MODULE_OK
The module is OK, continue.
@ RLM_MODULE_FAIL
Module failed, don't reply.
static fr_dict_attr_t const * attr_user_password
static unlang_action_t mod_process(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
static fr_dict_t const * dict_freeradius
static int auth_type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED conf_parser_t const *rule)
static fr_dict_t const * dict_radius
rlm_eap_submodule_t rlm_eap_gtc
static fr_dict_attr_t const * attr_auth_type
fr_dict_attr_autoload_t rlm_eap_gtc_dict_attr[]
static unlang_action_t gtc_resume(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
fr_dict_enum_value_t const * auth_type
fr_dict_autoload_t rlm_eap_gtc_dict[]
static conf_parser_t submodule_config[]
static unlang_action_t mod_session_init(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
void * data
Module's instance data.
unlang_action_t unlang_module_yield_to_section(rlm_rcode_t *p_result, request_t *request, CONF_SECTION *subcs, rlm_rcode_t default_rcode, module_method_t resume, unlang_module_signal_t signal, fr_signal_t sigmask, void *rctx)
MEM(pair_append_request(&vp, attr_eap_aka_sim_identity) >=0)
eap_aka_sim_process_conf_t * inst
Stores an attribute, a value and various bits of other data.
module_t common
Common fields provided by all modules.
Interface exported by EAP submodules.
static size_t char ** out