From: Alan T. DeKok Date: Thu, 20 Aug 2020 21:54:09 +0000 (-0400) Subject: ensure things are initialized X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1899e5492a1069fcdafc3e673d27f6fd47e116c5;p=thirdparty%2Ffreeradius-server.git ensure things are initialized --- diff --git a/src/modules/proto_tacacs/proto_tacacs_auth.c b/src/modules/proto_tacacs/proto_tacacs_auth.c index ce45fa39471..e8abdbd8e05 100644 --- a/src/modules/proto_tacacs/proto_tacacs_auth.c +++ b/src/modules/proto_tacacs/proto_tacacs_auth.c @@ -158,17 +158,17 @@ static rlm_rcode_t mod_process(module_ctx_t const *mctx, REQUEST *request) REQUEST_VERIFY(request); + /* + * Wrapper to distinguish between Authentication Start & Continue. + */ + if (request->packet->code == FR_PACKET_TYPE_VALUE_AUTHENTICATION_START) { + auth_ctx = &inst->start; + } else { + auth_ctx = &inst->cont; + } + switch (request->request_state) { case REQUEST_INIT: - /* - * Wrapper to distinguish between Authentication Start & Continue. - */ - if (request->packet->code == FR_PACKET_TYPE_VALUE_AUTHENTICATION_START) { - auth_ctx = &inst->start; - } else { - auth_ctx = &inst->cont; - } - request->component = "tacacs"; /* @@ -339,11 +339,8 @@ static rlm_rcode_t mod_process(module_ctx_t const *mctx, REQUEST *request) } setup_send: - unlang = auth_ctx->send_reply; - instruction = auth_ctx->unlang_reply; - - RDEBUG("Running 'send %s' from file %s", cf_section_name2(unlang), cf_filename(unlang)); - unlang_interpret_push_instruction(request, instruction, RLM_MODULE_NOOP, UNLANG_TOP_FRAME); + RDEBUG("Running 'send %s' from file %s", cf_section_name2(auth_ctx->send_reply), cf_filename(auth_ctx->send_reply)); + unlang_interpret_push_instruction(request, auth_ctx->unlang_reply, RLM_MODULE_NOOP, UNLANG_TOP_FRAME); request->request_state = REQUEST_SEND; FALL_THROUGH;