.list_def = tmpl_list(map->lhs),
.prefix = TMPL_ATTR_REF_PREFIX_AUTO
},
+ .xlat = {
+ .runtime_el = unlang_interpret_event_list(request),
+ },
.at_runtime = true,
};
.attr = {
.dict_def = request->dict
},
+ .xlat = {
+ .runtime_el = lhs_rules.xlat.runtime_el,
+ },
.at_runtime = true,
};
map_t *attr;
char *value;
- tmpl_rules_t parse_rules = {
- .at_runtime = true,
+ tmpl_rules_t const parse_rules = {
.attr = {
.dict_def = request->dict,
.list_def = request_attr_request,
.prefix = TMPL_ATTR_REF_PREFIX_AUTO
- }
+ },
+ .xlat = {
+ .runtime_el = unlang_interpret_event_list(request),
+ },
+ .at_runtime = true,
};
value = fr_ldap_berval_to_string(request, values[i]);
* Ensure any xlats produced are bootstrapped
* so that their instance data will be created.
*/
- if (!t_rules->at_runtime && head && (xlat_bootstrap(head) < 0)) {
- fr_strerror_const("Failed to bootstrap xlat");
- FR_SBUFF_ERROR_RETURN(&our_in);
+ if (head) {
+ int rcode;
+
+ if (!t_rules->at_runtime) {
+ rcode = xlat_bootstrap(head);
+ } else {
+ rcode = xlat_instantiate_ephemeral(head, t_rules->xlat.runtime_el);
+ }
+ if (rcode < 0) {
+ fr_strerror_const("Failed to bootstrap xlat");
+ FR_SBUFF_ERROR_RETURN(&our_in);
+ }
}
if (xlat_needs_resolving(head)) UNRESOLVED_SET(&type);
xlat_exp_head_t *head;
MEM(head = xlat_exp_head_alloc(ctx));
- if (t_rules) head->dict = t_rules->attr.dict_def;
+ if (t_rules) {
+ head->dict = t_rules->attr.dict_def;
+ fr_assert(!t_rules->at_runtime || t_rules->xlat.runtime_el); /* if it's at runtime, we need an event list */
+ }
fr_strerror_clear(); /* Clear error buffer */
.allow_unknown = true,
.allow_unresolved = false,
},
+ .xlat = {
+ .runtime_el = unlang_interpret_event_list(request),
+ },
.at_runtime = true
});
if (!vpt) {