return slen;
}
-static ssize_t command_tmpl_rule_disallow_qualifiers(UNUSED TALLOC_CTX *ctx, tmpl_rules_t *rules, fr_sbuff_t *value)
-{
- bool res;
- ssize_t slen;
-
- slen = fr_sbuff_out_bool(&res, value);
- rules->attr.disallow_qualifiers = res;
- return slen;
-}
-
static ssize_t command_tmpl_rule_list_def(UNUSED TALLOC_CTX *ctx, tmpl_rules_t *rules, fr_sbuff_t *value)
{
ssize_t slen;
{ L("allow_unknown"), (void *)command_tmpl_rule_allow_unknown },
{ L("allow_unresolved"), (void *)command_tmpl_rule_allow_unresolved },
{ L("attr_parent"), (void *)command_tmpl_rule_attr_parent },
- { L("disallow_qualifiers"), (void *)command_tmpl_rule_disallow_qualifiers },
{ L("list_def"), (void *)command_tmpl_rule_list_def },
{ L("request_def"), (void *)command_tmpl_rule_request_def }
};
{ L("tmpl-rules "), &(command_entry_t){
.func = command_tmpl_rules,
- .usage = "tmpl-rule [allow_foreign=yes] [allow_unknown=yes|no] [allow_unresolved=yes|no] [attr_parent=<oid>] [disallow_qualifiers=yes|no] [list_def=request|reply|control|session-state] [request_def=current|outer|parent]",
+ .usage = "tmpl-rule [allow_foreign=yes] [allow_unknown=yes|no] [allow_unresolved=yes|no] [attr_parent=<oid>] [list_def=request|reply|control|session-state] [request_def=current|outer|parent]",
.description = "Alter the tmpl parsing rules for subsequent tmpl parsing commands in the same command context"
}},
{ L("touch "), &(command_entry_t){
goto error; /* re-do "goto marker" stuff to print out spaces ? */
}
- /*
- * Disallow list qualifiers for the child
- * templates. The syntax requires that
- * the child attributes go into the
- * parent one.
- */
- child_lhs_rules.attr.disallow_qualifiers = true;
-
/*
* The leaf reference of the outer section
* is used as the parsing context of the
uint8_t allow_foreign:1; //!< Allow arguments not found in dict_def.
- uint8_t disallow_qualifiers:1; //!< disallow request / list qualifiers
-
uint8_t disallow_filters:1; //!< disallow filters.
};
}
if (depth == 0) {
- if (at_rules->namespace || at_rules->disallow_qualifiers) {
+ if (at_rules->namespace || (at_rules->list_presence == TMPL_ATTR_LIST_FORBID)) {
fr_strerror_const("It is not permitted to specify a request reference here");
if (err) *err = TMPL_ATTR_ERROR_INVALID_LIST_QUALIFIER;
.dict_def = dict,
.prefix = TMPL_ATTR_REF_PREFIX_NO,
.list_def = request_attr_request,
- .disallow_qualifiers = true, /* for now, until more tests are made */
+ .list_presence = TMPL_ATTR_LIST_FORBID,
/*
* Otherwise the tmpl code returns 0 when asked
.dict_def = dict,
.prefix = TMPL_ATTR_REF_PREFIX_YES,
.list_def = request_attr_request,
- .disallow_qualifiers = true, /* for now, until rlm_files supports it */
+ .list_presence = TMPL_ATTR_LIST_FORBID,
}
};
.allow_foreign = false,
.allow_unknown = false,
.allow_unresolved = false,
- .disallow_qualifiers = true,
+ .list_presence = TMPL_ATTR_LIST_FORBID,
}
};