From: Nick Porter Date: Tue, 13 Feb 2024 18:03:43 +0000 (+0000) Subject: If user is in radcheck but not radreply, still merge control items X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66bcf5e45dff3770f8c22eaff913fe84a0c6792c;p=thirdparty%2Ffreeradius-server.git If user is in radcheck but not radreply, still merge control items --- diff --git a/src/modules/rlm_sql/rlm_sql.c b/src/modules/rlm_sql/rlm_sql.c index ce4eb234275..4bdcf006d22 100644 --- a/src/modules/rlm_sql/rlm_sql.c +++ b/src/modules/rlm_sql/rlm_sql.c @@ -1240,11 +1240,15 @@ static unlang_action_t CC_HINT(nonnull) mod_authorize(rlm_rcode_t *p_result, mod do_fall_through = fall_through(&reply_tmp); - RDEBUG2("User found in radreply table, merging reply items"); + RDEBUG2("User found in radreply table"); user_found = true; + } +skip_reply: + if (map_list_num_elements(&reply_tmp)) { + RDEBUG2("Merging control and reply items"); if (radius_legacy_map_list_apply(request, &reply_tmp, NULL) < 0) { - RPEDEBUG("Failed applying reply item"); + RPEDEBUG("Failed applying item"); map_list_talloc_free(&reply_tmp); rcode = RLM_MODULE_FAIL; goto error; @@ -1261,7 +1265,6 @@ static unlang_action_t CC_HINT(nonnull) mod_authorize(rlm_rcode_t *p_result, mod */ if (!inst->config.groupmemb_query) goto release; -skip_reply: if ((do_fall_through == FALL_THROUGH_YES) || (inst->config.read_groups && (do_fall_through == FALL_THROUGH_DEFAULT))) { rlm_rcode_t ret;