From: Nick Porter Date: Mon, 23 Jan 2023 15:43:43 +0000 (+0000) Subject: Allow &list.[*] for selected tmpl parsing X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2dbb9bd444e1d5a7b77e696a6ea0192b5cf45c21;p=thirdparty%2Ffreeradius-server.git Allow &list.[*] for selected tmpl parsing --- diff --git a/src/lib/unlang/compile.c b/src/lib/unlang/compile.c index 9505b8ec424..9968d1fc9be 100644 --- a/src/lib/unlang/compile.c +++ b/src/lib/unlang/compile.c @@ -1647,6 +1647,7 @@ static unlang_t *compile_update(unlang_t *parent, unlang_compile_t *unlang_ctx, */ t_rules = *(unlang_ctx->rules); t_rules.attr.allow_unknown = true; + t_rules.attr.allow_wildcard = true; RULES_VERIFY(&t_rules); g = group_allocate(parent, cs, &update_ext); @@ -3478,6 +3479,7 @@ static unlang_t *compile_foreach(unlang_t *parent, unlang_compile_t *unlang_ctx, */ t_rules = *(unlang_ctx->rules); t_rules.attr.allow_unknown = true; + t_rules.attr.allow_wildcard = true; RULES_VERIFY(&t_rules); name2 = cf_section_name2(cs); diff --git a/src/lib/unlang/xlat_builtin.c b/src/lib/unlang/xlat_builtin.c index f59dcb5d247..d4d6d89b9d8 100644 --- a/src/lib/unlang/xlat_builtin.c +++ b/src/lib/unlang/xlat_builtin.c @@ -1154,6 +1154,7 @@ static xlat_action_t xlat_func_debug_attr(UNUSED TALLOC_CTX *ctx, UNUSED fr_dcur .attr = { .dict_def = request->dict, .list_def = PAIR_LIST_REQUEST, + .allow_wildcard = true, .prefix = TMPL_ATTR_REF_PREFIX_AUTO } }) <= 0) { @@ -2752,6 +2753,7 @@ static xlat_action_t xlat_func_pairs(TALLOC_CTX *ctx, fr_dcursor_t *out, .attr = { .dict_def = request->dict, .list_def = PAIR_LIST_REQUEST, + .allow_wildcard = true, .prefix = TMPL_ATTR_REF_PREFIX_AUTO } }) <= 0) { @@ -3910,6 +3912,7 @@ static xlat_action_t protocol_encode_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out, .attr = { .dict_def = request->dict, .list_def = PAIR_LIST_REQUEST, + .allow_wildcard = true, .prefix = TMPL_ATTR_REF_PREFIX_AUTO } }) <= 0) { diff --git a/src/modules/rlm_cache/rlm_cache.c b/src/modules/rlm_cache/rlm_cache.c index 3d7d23bb153..dff3e8fdd90 100644 --- a/src/modules/rlm_cache/rlm_cache.c +++ b/src/modules/rlm_cache/rlm_cache.c @@ -1015,6 +1015,7 @@ static int mod_instantiate(module_inst_ctx_t const *mctx) tmpl_rules_t parse_rules = { .attr = { .list_def = PAIR_LIST_REQUEST, + .allow_wildcard = true, .allow_foreign = true /* Because we don't know where we'll be called */ } }; diff --git a/src/modules/rlm_json/rlm_json.c b/src/modules/rlm_json/rlm_json.c index 7ddfaa75250..2f13d33ec7d 100644 --- a/src/modules/rlm_json/rlm_json.c +++ b/src/modules/rlm_json/rlm_json.c @@ -201,6 +201,7 @@ static xlat_action_t json_encode_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out, &(tmpl_rules_t){ .attr = { .list_def = PAIR_LIST_REQUEST, + .allow_wildcard = true, .dict_def = request->dict } });