static int mod_bootstrap(module_inst_ctx_t const *mctx)
{
process_tacacs_t *inst = talloc_get_type_abort(mctx->inst->data, process_tacacs_t);
- CONF_SECTION *server_cs = cf_item_to_section(cf_parent(mctx->inst->conf));
- fr_assert(mctx->inst->conf);
- fr_assert(server_cs);
-
- fr_assert(strcmp(cf_section_name1(server_cs), "server") == 0);
-
- inst->server_cs = server_cs;
- if (virtual_server_section_attribute_define(server_cs, "authenticate", attr_auth_type) < 0) return -1;
+ inst->server_cs = cf_section_find_in_parent(mctx->inst->conf, "server", CF_IDENT_ANY);
+ if (virtual_server_section_attribute_define(inst->server_cs, "authenticate", attr_auth_type) < 0) return -1;
return 0;
}