]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
set inst->server_cs from parent, not from finding any server
authorAlan T. DeKok <aland@freeradius.org>
Fri, 10 Feb 2023 23:54:44 +0000 (18:54 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 11 Feb 2023 13:00:15 +0000 (08:00 -0500)
src/process/dhcpv6/base.c
src/process/radius/base.c
src/process/tacacs/base.c
src/process/ttls/base.c

index 34ce9bf2158b14ea95468b0c71b5f9c7a14e8920..18cf29769ec194ba357dbe935976ad921b46ab46 100644 (file)
@@ -741,7 +741,7 @@ static int mod_bootstrap(module_inst_ctx_t const *mctx)
 {
        process_dhcpv6_t        *inst = talloc_get_type_abort(mctx->inst->data, process_dhcpv6_t);
 
-       inst->server_cs = cf_section_find_in_parent(mctx->inst->conf, "server", CF_IDENT_ANY);
+       inst->server_cs = cf_item_to_section(cf_parent(mctx->inst->conf));
 
        return 0;
 }
index d667dbd9f6dd7da9e43c40378792c90fd7683284..d3d09ff314473d1a4e2d0a4cd6373c8c6b10a700 100644 (file)
@@ -836,7 +836,7 @@ static int mod_bootstrap(module_inst_ctx_t const *mctx)
 {
        process_radius_t        *inst = talloc_get_type_abort(mctx->inst->data, process_radius_t);
 
-       inst->server_cs = cf_section_find_in_parent(mctx->inst->conf, "server", CF_IDENT_ANY);
+       inst->server_cs = cf_item_to_section(cf_parent(mctx->inst->conf));
        if (virtual_server_section_attribute_define(inst->server_cs, "authenticate", attr_auth_type) < 0) return -1;
 
        return 0;
index 803890b6e9663905e153354cf36046054adeeaf7..81217c8d41b857e5846864131fb57de53363a242 100644 (file)
@@ -817,7 +817,7 @@ static int mod_bootstrap(module_inst_ctx_t const *mctx)
 {
        process_tacacs_t        *inst = talloc_get_type_abort(mctx->inst->data, process_tacacs_t);
 
-       inst->server_cs = cf_section_find_in_parent(mctx->inst->conf, "server", CF_IDENT_ANY);
+       inst->server_cs = cf_item_to_section(cf_parent(mctx->inst->conf));
        if (virtual_server_section_attribute_define(inst->server_cs, "authenticate", attr_auth_type) < 0) return -1;
 
        return 0;
index cf823ee3883ff20e320e72977e846b582432fbc6..92bf2fee6238a752da1edee9b8e4f8926cab8a64 100644 (file)
@@ -675,7 +675,7 @@ static int mod_bootstrap(module_inst_ctx_t const *mctx)
 {
        process_ttls_t  *inst = talloc_get_type_abort(mctx->inst->data, process_ttls_t);
 
-       inst->server_cs = cf_section_find_in_parent(mctx->inst->conf, "server", CF_IDENT_ANY);
+       inst->server_cs = cf_item_to_section(cf_parent(mctx->inst->conf));
        if (virtual_server_section_attribute_define(inst->server_cs, "authenticate", attr_auth_type) < 0) return -1;
 
        return 0;