]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Wrap the module method array in a grouping structure
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 9 Jun 2024 22:46:00 +0000 (18:46 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 16 Jun 2024 04:10:52 +0000 (22:10 -0600)
58 files changed:
src/lib/server/dl_module.c
src/lib/server/dl_module.h
src/lib/server/module.c
src/lib/server/module.h
src/lib/server/module_rlm.c
src/lib/server/module_rlm.h
src/lib/unlang/call_env.h
src/modules/rlm_always/rlm_always.c
src/modules/rlm_attr_filter/rlm_attr_filter.c
src/modules/rlm_cache/rlm_cache.c
src/modules/rlm_chap/rlm_chap.c
src/modules/rlm_client/rlm_client.c
src/modules/rlm_couchbase/rlm_couchbase.c
src/modules/rlm_csv/rlm_csv.c
src/modules/rlm_delay/rlm_delay.c
src/modules/rlm_detail/rlm_detail.c
src/modules/rlm_dhcpv4/rlm_dhcpv4.c
src/modules/rlm_digest/rlm_digest.c
src/modules/rlm_eap/rlm_eap.c
src/modules/rlm_exec/rlm_exec.c
src/modules/rlm_files/rlm_files.c
src/modules/rlm_imap/rlm_imap.c
src/modules/rlm_isc_dhcp/rlm_isc_dhcp.c
src/modules/rlm_krb5/rlm_krb5.c
src/modules/rlm_ldap/rlm_ldap.c
src/modules/rlm_linelog/rlm_linelog.c
src/modules/rlm_logtee/rlm_logtee.c
src/modules/rlm_lua/rlm_lua.c
src/modules/rlm_mruby/rlm_mruby.c
src/modules/rlm_mschap/rlm_mschap.c
src/modules/rlm_opendirectory/rlm_opendirectory.c
src/modules/rlm_pam/rlm_pam.c
src/modules/rlm_pap/rlm_pap.c
src/modules/rlm_passwd/rlm_passwd.c
src/modules/rlm_perl/rlm_perl.c
src/modules/rlm_python/rlm_python.c
src/modules/rlm_radius/rlm_radius.c
src/modules/rlm_radutmp/rlm_radutmp.c
src/modules/rlm_redis_ippool/rlm_redis_ippool.c
src/modules/rlm_rediswho/rlm_rediswho.c
src/modules/rlm_rest/rlm_rest.c
src/modules/rlm_securid/rlm_securid.c
src/modules/rlm_sigtran/rlm_sigtran.c
src/modules/rlm_smtp/rlm_smtp.c
src/modules/rlm_sometimes/rlm_sometimes.c
src/modules/rlm_sql/rlm_sql.c
src/modules/rlm_sqlcounter/rlm_sqlcounter.c
src/modules/rlm_sqlippool/rlm_sqlippool.c
src/modules/rlm_stats/rlm_stats.c
src/modules/rlm_tacacs/rlm_tacacs.c
src/modules/rlm_test/rlm_test.c
src/modules/rlm_totp/rlm_totp.c
src/modules/rlm_unix/rlm_unix.c
src/modules/rlm_utf8/rlm_utf8.c
src/modules/rlm_wimax/rlm_wimax.c
src/modules/rlm_winbind/rlm_winbind.c
src/modules/rlm_yubikey/rlm_yubikey.c
src/tests/modules/test/section_names.unlang

index 6f7f591561472e8210eeee2fe2c9ac50ce5d5ba3..77876e9999e87ef67238ab17b100c1a0aeb22aab 100644 (file)
@@ -318,7 +318,7 @@ dl_module_t *dl_module_alloc(dl_module_t const *parent, char const *name, dl_mod
        dl_t                            *dl = NULL;
        char                            *module_name = NULL;
        char                            *p, *q;
-       dl_module_common_t const        *common;
+       dl_module_common_t              *common;
 
        DL_INIT_CHECK;
 
index a964289e86fedacdc49444884ccca8e838c5ff2b..edfd9405472ea657c557139f2c8791fd1dc62b9c 100644 (file)
@@ -125,7 +125,7 @@ struct dl_module_s {
 
        dl_module_type_t                _CONST type;            //!< of this module.
 
-       dl_module_common_t const        * _CONST exported;      //!< Symbol exported by the module, containing its public
+       dl_module_common_t              *exported;              //!< Symbol exported by the module, containing its public
                                                                //!< functions, name and behaviour control flags.
 
        CONF_SECTION                    * _CONST conf;          //!< The module's global configuration
index 3f9a0da17fa79cc6183a86627da59159e2910c7d..a9150ac497fb48719805801cc2ce1d9e4898437e 100644 (file)
@@ -1724,7 +1724,7 @@ module_instance_t *module_instance_alloc(module_list_t *ml,
        /*
         *      We have no way of checking if this is correct... so we hope...
         */
-       mi->exported = (module_t const *)mi->module->exported;
+       mi->exported = (module_t *)mi->module->exported;
        if (unlikely(mi->exported == NULL)) {
                ERROR("Missing public structure for \"%s\"", qual_inst_name);
                goto error;
index 9ae74d4ac2a789167aa812171cb6366842e2f338..e734bce8ab9d0a13fd5a24165aa89fe16b450308 100644 (file)
@@ -32,6 +32,7 @@ extern "C" {
 
 typedef struct module_s                                module_t;
 typedef struct module_state_func_table_s       module_state_func_table_t;
+typedef struct module_method_group_s           module_method_group_t;
 typedef struct module_method_binding_s         module_method_binding_t;
 typedef struct module_instance_s               module_instance_t;
 typedef struct module_thread_instance_s                module_thread_instance_t;
@@ -149,6 +150,23 @@ extern "C" {
  */
 #define MODULE_BINDING_TERMINATOR { .section = NULL }
 
+/** A group of methods exported by a module or added as an overlay
+ *
+ * Module method groups are organised into a linked list, with each group
+ * containing a list of named methods.  This allows common collections of
+ * methods to be added to a module.
+ *
+ * One common use case is adding the `instantiate`, `exists`, and `detach`
+ * methods which are added to dynamic modules, and allow dynamic module
+ * instances to be created and destroyed at runtime.
+ */
+struct module_method_group_s {
+       module_method_binding_t                 *bindings;              //!< named methods
+
+       bool                                    validated;              //!< Set to true by #module_method_group_validate.
+       module_method_group_t                   *next;                  //!< Next group in the list.
+};
+
 /** Named methods exported by a module
  *
  */
@@ -238,9 +256,9 @@ typedef struct {
        size_t                          len;            //!< How much data we need mprotect to protect.
 } module_data_pool_t;
 
-/** Per instance data
+/** Module instance data
  *
- * Per-instance data structure, to correlate the modules with the
+ * Per-module-instance data structure to correlate the modules with the
  * instance names (may NOT be the module names!), and the per-instance
  * data structures.
  */
@@ -251,21 +269,21 @@ struct module_instance_s {
        * @{
        */
        void                            *data;          //!< Module's instance data.  This is most
-                                                       ///< frequently access comes first.
+                                                       ///< frequently accessed, so comes first.
 
        void                            *boot;          //!< Data allocated during the boostrap phase
 
-       module_t const                  *exported;      //!< Public module structure.  Cached for convenience.
+       module_t                        *exported;      //!< Public module structure.  Cached for convenience.
                                                        ///< This exports module methods, i.e. the functions
                                                        ///< which allow the module to perform actions.
-                                                       ///< This is an identical address to dl_module->common,
+                                                       ///< This is an identical address to module->common,
                                                        ///< but with a different type, containing additional
                                                        ///< instance callbacks to make it easier to use.
 
        pthread_mutex_t                 mutex;          //!< Used prevent multiple threads entering a thread
                                                        ///< unsafe module simultaneously.
 
-       dl_module_t                     *module;        //!< dynamic loader handle.  Contains the module's
+       dl_module_t                     *module;        //!< Dynamic loader handle.  Contains the module's
                                                        ///< dlhandle, and the functions it exports.
                                                        ///< The dl_module is reference counted so that it
                                                        ///< can be freed automatically when the last instance
@@ -342,6 +360,9 @@ struct module_thread_instance_s {
 };
 
 /** Callback to retrieve thread-local data for a module
+ *
+ * This is public for performance reasons, and should be called through
+ * #module_thread.
  *
  * @param[in] mi       to add data to (use mi->ml for the module list).
  * @return
index ef94993c23e58599f176bee82ce46c4cb33da883..d63ac3b701af0b720f5f06fc2a1d0611817f3a45 100644 (file)
@@ -755,7 +755,7 @@ fr_slen_t module_rlm_by_name_and_method(TALLOC_CTX *ctx, module_method_call_t *m
                        .name2 = fr_sbuff_used(elem2) ? elem2->start : NULL
                };
 
-               mmb = module_binding_find(mmc->rlm->bindings, &method);
+               mmb = module_binding_find(mmc->rlm->method.bindings, &method);
                if (!mmb) {
                        fr_strerror_printf("Module \"%s\" does not have method %s%s%s",
                                           mmc->mi->name,
@@ -764,7 +764,7 @@ fr_slen_t module_rlm_by_name_and_method(TALLOC_CTX *ctx, module_method_call_t *m
                                           method.name2 ? method.name2 : ""
                                           );
 
-                       module_rlm_methods_to_strerror(mmc->rlm->bindings);
+                       module_rlm_methods_to_strerror(mmc->rlm->method.bindings);
                        return fr_sbuff_error(&meth_start);
                }
                mmc->mmb = *mmb;        /* For locality of reference and fewer derefs */
@@ -781,12 +781,12 @@ by_section:
         *
         *      If that fails, we're done.
         */
-       mmb = module_binding_find(mmc->rlm->bindings, section);
+       mmb = module_binding_find(mmc->rlm->method.bindings, section);
        if (!mmb) {
                section_name_t const **alt_p = virtual_server_section_methods(vs, section);
                if (alt_p) {
                        for (; *alt_p; alt_p++) {
-                               mmb = module_binding_find(mmc->rlm->bindings, *alt_p);
+                               mmb = module_binding_find(mmc->rlm->method.bindings, *alt_p);
                                if (mmb) {
                                        if (mmc_out) section_name_dup(ctx, &mmc->asked, *alt_p);
                                        break;
@@ -805,7 +805,7 @@ by_section:
                                   section->name2 ? "." : "",
                                   section->name2 ? section->name2 : ""
                                   );
-               module_rlm_methods_to_strerror(mmc->rlm->bindings);
+               module_rlm_methods_to_strerror(mmc->rlm->method.bindings);
 
                return fr_sbuff_error(&meth_start);
        }
@@ -1006,27 +1006,24 @@ static int8_t binding_name_cmp(void const *one, void const *two)
        return section_name_cmp(a->section, b->section);
 }
 
-static int module_method_validate(module_instance_t *mi)
+static int module_method_group_validate(module_method_group_t *group)
 {
        module_method_binding_t *p, *srt_p;
-       module_rlm_t const      *mrlm;
        fr_dlist_head_t         bindings;
        bool                    in_order = true;
 
-       mrlm = module_rlm_from_module(mi->exported);
-
-       fr_dlist_init(&bindings, module_method_binding_t, entry);
-
        /*
         *      Not all modules export module method bindings
         */
-       if (!mrlm->bindings) return 0;
+       if (!group || !group->bindings || group->validated) return 0;
+
+       fr_dlist_init(&bindings, module_method_binding_t, entry);
 
-       for (p = mrlm->bindings; p->section; p++) {
+       for (p = group->bindings; p->section; p++) {
                if (!fr_cond_assert_msg(p->section->name1,
-                                       "%s: First section identifier can't be NULL", mi->name)) return -1;
+                                       "First section identifier can't be NULL")) return -1;
                if (!fr_cond_assert_msg(p->section->name1 || p->section->name2,
-                                       "%s: Section identifiers can't both be null", mi->name)) return -1;
+                                       "Section identifiers can't both be null")) return -1;
 
                /*
                 *      All the bindings go in a list so we can sort them
@@ -1042,7 +1039,7 @@ static int module_method_validate(module_instance_t *mi)
         *      and the original list, to ensure they're
         *      in the correct order.
         */
-       for (srt_p = fr_dlist_head(&bindings), p = mrlm->bindings;
+       for (srt_p = fr_dlist_head(&bindings), p = group->bindings;
             srt_p;
             srt_p = fr_dlist_next(&bindings, srt_p), p++) {
                if (p != srt_p) {
@@ -1063,7 +1060,7 @@ static int module_method_validate(module_instance_t *mi)
                     srt_p = fr_dlist_next(&bindings, srt_p), p++) {
                        *p = *srt_p;
                }
-               memcpy(mrlm->bindings, ordered, fr_dlist_num_elements(&bindings) * sizeof(*ordered));
+               memcpy(group->bindings, ordered, fr_dlist_num_elements(&bindings) * sizeof(*ordered));
                talloc_free(ordered);
        }
 
@@ -1073,7 +1070,7 @@ static int module_method_validate(module_instance_t *mi)
        {
                module_method_binding_t *last_binding = NULL;
 
-               for (p = mrlm->bindings; p->section; p++) {
+               for (p = group->bindings; p->section; p++) {
                        if (!last_binding ||
                                (
                                        (last_binding->section->name1 != p->section->name1) &&
@@ -1090,8 +1087,16 @@ static int module_method_validate(module_instance_t *mi)
                        fr_dlist_insert_tail(&last_binding->same_name1, p);
                }
        }
+       group->validated = true;
 
-       return 0;
+       CC_HINT(musttail) return module_method_group_validate(group->next);
+}
+
+static int module_method_validate(module_instance_t *mi)
+{
+       module_rlm_t *mrlm = module_rlm_from_module(mi->exported);
+
+       return module_method_group_validate(&mrlm->method);
 }
 
 /** Compare xlat functions registered to a module
index 09d281103bbeef90311a45b6a06906a794c60f81..a352e5763945b48454fa88eac08590f8a859a967 100644 (file)
@@ -37,7 +37,7 @@ typedef struct module_rlm_instance_s module_rlm_instance_t;
 
 struct module_rlm_s {
        module_t                        common;                 //!< Common fields presented by all modules.
-       module_method_binding_t         *bindings;              //!< named methods
+       module_method_group_t           method;                 //!< named methods
 };
 
 struct module_rlm_instance_s {
@@ -70,12 +70,9 @@ typedef struct {
        tmpl_t                          *key;                   //!< Dynamic key, only set for dynamic modules.
 } module_method_call_t;
 
-/** Cast a module_t to a module_rlm_t
- *
- */
-static inline module_rlm_t const *module_rlm_from_module(module_t const *module)
+static inline module_rlm_t *module_rlm_from_module(module_t *module)
 {
-       return (module_rlm_t const *)module;
+       return (module_rlm_t *)module;
 }
 
 /** @name Debug functions
index c65a79bd868d8d6eb3a41310e7e2db9e58698577..750c489514607c999a99c7757b277b38dd985872 100644 (file)
@@ -173,8 +173,8 @@ typedef int (*call_env_parse_section_t)(TALLOC_CTX *ctx, call_env_parsed_head_t
  * and use the appropriate dictionaries for where the module is in use.
  */
 struct call_env_parser_s {
-       char const              *name;                  //!< Of conf pair to pass to tmpl_tokenizer.
-       call_env_flags_t        flags;                  //!< Flags controlling parser behaviour.
+       char const                      *name;                  //!< Of conf pair to pass to tmpl_tokenizer.
+       call_env_flags_t                flags;                  //!< Flags controlling parser behaviour.
 
        union {
                struct {
@@ -199,7 +199,7 @@ struct call_env_parser_s {
                        } parsed;
 
                        fr_value_box_safe_for_t         literals_safe_for;      //!< What safe_for value to assign any literals that are arguments to the tmpl_t.
-                       tmpl_escape_t                   escape;         //!< Escape method to use when evaluating tmpl_t.
+                       tmpl_escape_t                   escape;                 //!< Escape method to use when evaluating tmpl_t.
                } pair;
 
                struct {
@@ -210,22 +210,22 @@ struct call_env_parser_s {
                } section;
        };
 
-       void const *uctx;                               //!< User context for callback functions.
+       void const *uctx;                                       //!< User context for callback functions.
 };
 
 typedef enum {
-       CALL_ENV_CTX_TYPE_MODULE = 1,                   //!< The callenv is registered to a module method.
-       CALL_ENV_CTX_TYPE_XLAT                          //!< The callenv is registered to an xlat.
+       CALL_ENV_CTX_TYPE_MODULE = 1,                           //!< The callenv is registered to a module method.
+       CALL_ENV_CTX_TYPE_XLAT                                  //!< The callenv is registered to an xlat.
 } call_env_ctx_type_t;
 
 struct call_env_ctx_s {
-       call_env_ctx_type_t                             type;           //!< Type of callenv ctx.
+       call_env_ctx_type_t             type;                   //!< Type of callenv ctx.
 
-       module_instance_t const                         *mi;            //!< Module instance that the callenv is registered to.
-                                                                       ///< Available for both module methods, and xlats.
+       module_instance_t const         *mi;                    //!< Module instance that the callenv is registered to.
+                                                               ///< Available for both module methods, and xlats.
 
-       section_name_t const                            *asked;         //!< The actual name1/name2 that resolved to a
-                                                                       ///< module_method_binding_t.
+       section_name_t const            *asked;                 //!< The actual name1/name2 that resolved to a
+                                                               ///< module_method_binding_t.
 };
 
 #define CALL_ENV_TERMINATOR { NULL }
@@ -237,9 +237,9 @@ struct call_env_ctx_s {
        .inst_type = STRINGIFY(_inst) \
 
 struct call_env_method_s {
-       size_t                          inst_size;      //!< Size of per call env.
-       char const                      *inst_type;     //!< Type of per call env.
-       call_env_parser_t const         *env;           //!< Parsing rules for call method env.
+       size_t                          inst_size;              //!< Size of per call env.
+       char const                      *inst_type;             //!< Type of per call env.
+       call_env_parser_t const         *env;                   //!< Parsing rules for call method env.
 };
 
 /** Structure containing both a talloc pool, a list of parsed call_env_pairs
index 46f1131c9dfa25ae8cce6cb5c98353438bd35506..d7dd8adf54983fab1105a7d0a6553fbd52a22e10 100644 (file)
@@ -191,8 +191,10 @@ module_rlm_t rlm_always = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_always_return },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_always_return },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index c9e637398393bb1f1c97c87b1280b3eac7888413..b56a57f91e631cf38dc044aca5135b1756e37495 100644 (file)
@@ -380,17 +380,19 @@ module_rlm_t rlm_attr_filter = {
                .config         = module_config,
                .instantiate    = mod_instantiate,
        },
-       .bindings = (module_method_binding_t[]){
-               /*
-                *      Hack to support old configurations
-                */
-               { .section = SECTION_NAME("accounting", CF_IDENT_ANY),          .method = mod_accounting        },
-               { .section = SECTION_NAME("authorize", CF_IDENT_ANY),           .method = mod_authorize         },
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       /*
+                        *      Hack to support old configurations
+                        */
+                       { .section = SECTION_NAME("accounting", CF_IDENT_ANY),          .method = mod_accounting        },
+                       { .section = SECTION_NAME("authorize", CF_IDENT_ANY),           .method = mod_authorize         },
 
-               { .section = SECTION_NAME("recv", "accounting-request"),        .method = mod_preacct           },
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY),                .method = mod_authorize         },
+                       { .section = SECTION_NAME("recv", "accounting-request"),        .method = mod_preacct           },
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY),                .method = mod_authorize         },
 
-               { .section = SECTION_NAME("send", CF_IDENT_ANY),                .method = mod_post_auth         },
-               MODULE_BINDING_TERMINATOR
+                       { .section = SECTION_NAME("send", CF_IDENT_ANY),                .method = mod_post_auth         },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 1e9171bb74688f8ee9ae28c4205ef9b8a2bac836..1241a21498b060d9389d6ddbe390d66b20d05cc1 100644 (file)
@@ -1515,14 +1515,16 @@ module_rlm_t rlm_cache = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("clear", CF_IDENT_ANY),               .method = mod_method_clear,     .method_env = &cache_method_env },
-               { .section = SECTION_NAME("load", CF_IDENT_ANY),                .method = mod_method_load,      .method_env = &cache_method_env },
-               { .section = SECTION_NAME("status", CF_IDENT_ANY),              .method = mod_method_status,    .method_env = &cache_method_env },
-               { .section = SECTION_NAME("store", CF_IDENT_ANY),               .method = mod_method_store,     .method_env = &cache_method_env },
-               { .section = SECTION_NAME("ttl", CF_IDENT_ANY),                 .method = mod_method_ttl,       .method_env = &cache_method_env },
-               { .section = SECTION_NAME("update", CF_IDENT_ANY),              .method = mod_method_update,    .method_env = &cache_method_env },
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY),          .method = mod_cache_it,         .method_env = &cache_method_env },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("clear", CF_IDENT_ANY), .method = mod_method_clear, .method_env = &cache_method_env },
+                       { .section = SECTION_NAME("load", CF_IDENT_ANY), .method = mod_method_load, .method_env = &cache_method_env },
+                       { .section = SECTION_NAME("status", CF_IDENT_ANY), .method = mod_method_status, .method_env = &cache_method_env },
+                       { .section = SECTION_NAME("store", CF_IDENT_ANY), .method = mod_method_store, .method_env = &cache_method_env },
+                       { .section = SECTION_NAME("ttl", CF_IDENT_ANY), .method = mod_method_ttl, .method_env = &cache_method_env },
+                       { .section = SECTION_NAME("update", CF_IDENT_ANY), .method = mod_method_update, .method_env = &cache_method_env },
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_cache_it, .method_env = &cache_method_env },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 36902ebc95023508852538dda9d1c668b1803803..b8a96f012b7044ff06bb2135bbcaa08d5656e14f 100644 (file)
@@ -388,9 +388,11 @@ module_rlm_t rlm_chap = {
                .config         = module_config,
                .instantiate    = mod_instantiate
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate, .method_env = &chap_auth_method_env },
-               { .section = SECTION_NAME("recv", "Access-Request"), .method = mod_authorize, .method_env = &chap_autz_method_env },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate, .method_env = &chap_auth_method_env },
+                       { .section = SECTION_NAME("recv", "Access-Request"), .method = mod_authorize, .method_env = &chap_autz_method_env },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 3db525376b21c966843aaa8834917e5b5c2fe2af..78a25f9d235119fa90ed46dfef51da0a67fa351f 100644 (file)
@@ -385,8 +385,10 @@ module_rlm_t rlm_client = {
                .onload         = mod_load,
                .unload         = mod_unload
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY),          .method = mod_authorize   },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_authorize },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index c26926a15b21fe125e732ee6ff27e090a89f6e67..94e28d1b53daaa8d82ea8f2a0159b028ef4820fc 100644 (file)
@@ -555,9 +555,11 @@ module_rlm_t rlm_couchbase = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("accounting", CF_IDENT_ANY),          .method = mod_accounting   },
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY),                .method = mod_authorize   },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting },
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index b6542d2194b3e2c5430df472726809970a59ab15..a0f261b7a56799e8d35e1c47e2a10fac0a9bcc6c 100644 (file)
@@ -1058,8 +1058,10 @@ module_rlm_t rlm_csv = {
                .bootstrap      = mod_bootstrap,
                .instantiate    = mod_instantiate,
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY),  .method = mod_process },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_process },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 2cdb2b6fc7ace42e6ef934c9b94ad08d12a5d6c4..eb2a120c208809c4c47f0b7d64433f0256a2733a 100644 (file)
@@ -279,8 +279,10 @@ module_rlm_t rlm_delay = {
                .config         = module_config,
                .bootstrap      = mod_bootstrap
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY),  .method = mod_delay },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_delay },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 07bf835a47c791156e8f8682e00f70252b101f6e..6104463b8699ec49d479f794a39ad8ec4513bf04 100644 (file)
@@ -508,11 +508,13 @@ module_rlm_t rlm_detail = {
                .config         = module_config,
                .instantiate    = mod_instantiate
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting, .method_env = &method_env },
-               { .section = SECTION_NAME("recv", "accounting-request"), .method = mod_accounting, .method_env = &method_env },
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize, .method_env = &method_env },
-               { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth, .method_env = &method_env },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting, .method_env = &method_env },
+                       { .section = SECTION_NAME("recv", "accounting-request"), .method = mod_accounting, .method_env = &method_env },
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize, .method_env = &method_env },
+                       { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth, .method_env = &method_env },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index bb3b065e3f92f485a9654e06613ea58d41d28591..4c3ca74fb68933c25e045dd48eb225ab5a0097fa 100644 (file)
@@ -333,8 +333,10 @@ module_rlm_t rlm_dhcpv4 = {
                .thread_inst_type       = "rlm_dhcpv4_thread_t",
                .thread_instantiate     = mod_thread_instantiate
        },
-        .bindings = (module_method_binding_t[]){
-                { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_process },
-                MODULE_BINDING_TERMINATOR
-        },
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY),  .method = mod_process },
+                       MODULE_BINDING_TERMINATOR
+               }
+       }
 };
index 12bfbe555bc7ec8fd69753e11b8fe3d15c6a85a7..acc4a896f70af6f40601e348499db3f197b31e32 100644 (file)
@@ -480,9 +480,11 @@ module_rlm_t rlm_digest = {
                .inst_size      = sizeof(rlm_digest_t),
                .instantiate    = mod_instantiate,
        },
-        .bindings = (module_method_binding_t[]){
-                { .section = SECTION_NAME("authenticate", CF_IDENT_ANY),       .method = mod_authenticate },
-                { .section = SECTION_NAME("recv", "Access-Request"), .method = mod_authorize },
-                MODULE_BINDING_TERMINATOR
-        },
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
+                       { .section = SECTION_NAME("recv", "Access-Request"), .method = mod_authorize },
+                       MODULE_BINDING_TERMINATOR
+               }
+       }
 };
index 46490eac5e930791cf57a68a3dc71e3898e22c08..4a4dfe23dccafed0d379fc481979de9b97c9792b 100644 (file)
@@ -1196,10 +1196,12 @@ module_rlm_t rlm_eap = {
                .unload         = mod_unload,
                .instantiate    = mod_instantiate,
        },
-        .bindings = (module_method_binding_t[]){
-                { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
-                { .section = SECTION_NAME("recv", "Access-Request"), .method = mod_authorize },
-                { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth },
-                MODULE_BINDING_TERMINATOR
-        }
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
+                       { .section = SECTION_NAME("recv", "Access-Request"), .method = mod_authorize },
+                       { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth },
+                       MODULE_BINDING_TERMINATOR
+               }
+       }
 };
index 34f2af4a9037f3dbcf452f0b9268ad4ce030c1a1..3027b51460a66bd4b50d2e696952788c2c134299 100644 (file)
@@ -531,8 +531,10 @@ module_rlm_t rlm_exec = {
                .bootstrap      = mod_bootstrap,
                .instantiate    = mob_instantiate
        },
-        .bindings = (module_method_binding_t[]){
-                { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_exec_dispatch_oneshot, .method_env = &exec_method_env },
-                MODULE_BINDING_TERMINATOR
-        }
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_exec_dispatch_oneshot, .method_env = &exec_method_env },
+                       MODULE_BINDING_TERMINATOR
+               }
+       }
 };
index 8efe980671298ab544097eaccb8279d89a6ba113..320f04610e9699abe86eb71e1279c258990a5161 100644 (file)
@@ -674,9 +674,10 @@ module_rlm_t rlm_files = {
                .inst_size      = sizeof(rlm_files_t),
                .config         = module_config,
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_files, .method_env = &method_env },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_files, .method_env = &method_env },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
-
 };
index ccc5a5ee770bf6066dc599efe154ed8c593744dd..4281425c8ee2102ceb9c316ae7a39c1287968b0f 100644 (file)
@@ -292,8 +292,10 @@ module_rlm_t rlm_imap = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach,
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 0619c7bcf5ef037dd511bef8c45d02d813411ea2..6f0077a0aaab731d97f53f4efbc54c19d5bfc1fe 100644 (file)
@@ -2240,9 +2240,11 @@ module_rlm_t rlm_isc_dhcp = {
                .config         = module_config,
                .instantiate    = mod_instantiate
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize },
-               { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize },
+                       { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 720975fed2a980402ae9dd92f52a4abdc935d163..71a857806dd20471f57a25fe0a49e312ccda25e0 100644 (file)
@@ -504,8 +504,10 @@ module_rlm_t rlm_krb5 = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY),                .method = mod_authenticate },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 8f41affbf3da246dc1f3a386c1a2ef476cfe8498..38f6a2de598c228447813c7515e9e6f381a278c7 100644 (file)
@@ -2712,33 +2712,35 @@ static void mod_unload(void)
 extern module_rlm_t rlm_ldap;
 module_rlm_t rlm_ldap = {
        .common = {
-               .magic          = MODULE_MAGIC_INIT,
-               .name           = "ldap",
-               .flags          = 0,
-               .boot_size      = sizeof(rlm_ldap_boot_t),
-               .boot_type      = "rlm_ldap_boot_t",
-               .inst_size      = sizeof(rlm_ldap_t),
-               .config         = module_config,
-               .onload         = mod_load,
-               .unload         = mod_unload,
-               .bootstrap      = mod_bootstrap,
-               .instantiate    = mod_instantiate,
-               .detach         = mod_detach,
+               .magic                  = MODULE_MAGIC_INIT,
+               .name                   = "ldap",
+               .flags                  = 0,
+               .boot_size              = sizeof(rlm_ldap_boot_t),
+               .boot_type              = "rlm_ldap_boot_t",
+               .inst_size              = sizeof(rlm_ldap_t),
+               .config                 = module_config,
+               .onload                 = mod_load,
+               .unload                 = mod_unload,
+               .bootstrap              = mod_bootstrap,
+               .instantiate            = mod_instantiate,
+               .detach                 = mod_detach,
                .thread_inst_size       = sizeof(fr_ldap_thread_t),
                .thread_inst_type       = "fr_ldap_thread_t",
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach,
        },
-       .bindings = (module_method_binding_t[]){
-               /*
-                *      Hack to support old configurations
-                */
-               { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting, .method_env = &usermod_method_env },
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate, .method_env = &authenticate_method_env },
-               { .section = SECTION_NAME("authorize", CF_IDENT_ANY), .method = mod_authorize, .method_env = &authorize_method_env },
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       /*
+                        *      Hack to support old configurations
+                        */
+                       { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting, .method_env = &usermod_method_env },
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate, .method_env = &authenticate_method_env },
+                       { .section = SECTION_NAME("authorize", CF_IDENT_ANY), .method = mod_authorize, .method_env = &authorize_method_env },
 
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize, .method_env = &authorize_method_env },
-               { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth, .method_env = &usermod_method_env },
-               MODULE_BINDING_TERMINATOR
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize, .method_env = &authorize_method_env },
+                       { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth, .method_env = &usermod_method_env },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index c421f67f8687e9ba1267248a70b626c76a3d3e00..b0bc7201b733dd562b06421772c36bb0aaa2adcb 100644 (file)
@@ -1059,8 +1059,10 @@ module_rlm_t rlm_linelog = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_do_linelog, .method_env = &linelog_method_env },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_do_linelog, .method_env = &linelog_method_env },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 4db45d90e305e50e552af4cf94cbd35ec00df54b..0bcf4c1ca339d989c6cd99238b0482964f043e0c 100644 (file)
@@ -665,8 +665,10 @@ module_rlm_t rlm_logtee = {
                .instantiate            = mod_instantiate,
                .thread_instantiate     = mod_thread_instantiate,
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY),          .method = mod_insert_logtee },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_insert_logtee },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index fc78a855bc99ec0a98e70c11858b5f4d9b5ca549..b03488d0bf989da44c181396974f9b2da7ef1e7e 100644 (file)
@@ -180,17 +180,19 @@ module_rlm_t rlm_lua = {
                .detach                 = mod_detach,
                .thread_detach          = mod_thread_detach
        },
-       .bindings = (module_method_binding_t[]){
-               /*
-                *      Hack to support old configurations
-                */
-               { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting },
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
-               { .section = SECTION_NAME("authorize", CF_IDENT_ANY), .method = mod_authorize },
-
-               { .section = SECTION_NAME("recv", "accounting-request"), .method = mod_preacct },
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize },
-               { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       /*
+                        *      Hack to support old configurations
+                        */
+                       { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting },
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
+                       { .section = SECTION_NAME("authorize", CF_IDENT_ANY), .method = mod_authorize },
+
+                       { .section = SECTION_NAME("recv", "accounting-request"), .method = mod_preacct },
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize },
+                       { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 3bd497243c5fd1a121e76e0b69289c39579246ec..26f4fe5a45faa8a3c829d5a6d79df58bb3fce474 100644 (file)
@@ -517,18 +517,20 @@ module_rlm_t rlm_mruby = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach,
        },
-       .bindings = (module_method_binding_t[]){
-               /*
-                *      Hack to support old configurations
-                */
-               { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting },
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
-               { .section = SECTION_NAME("authorize", CF_IDENT_ANY), .method = mod_authorize },
-
-               { .section = SECTION_NAME("recv", "accounting-request"), .method = mod_preacct },
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize },
-
-               { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       /*
+                        *      Hack to support old configurations
+                        */
+                       { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting },
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
+                       { .section = SECTION_NAME("authorize", CF_IDENT_ANY), .method = mod_authorize },
+
+                       { .section = SECTION_NAME("recv", "accounting-request"), .method = mod_preacct },
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize },
+
+                       { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 9a7259e42f72e9b9ec5579289ca0dc81a99b34ec..8cb4487afb8475d96bb1eaaab9c37c49d6f7ce7b 100644 (file)
@@ -2527,9 +2527,11 @@ module_rlm_t rlm_mschap = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate, .method_env = &mschap_auth_method_env },
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize, .method_env = &mschap_autz_method_env },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate, .method_env = &mschap_auth_method_env },
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize, .method_env = &mschap_autz_method_env },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 91f7c342ec1051ae5142b02fd68477096614a35c..25acedcc6afae70b790bef9ccfd7697f7c2b62eb 100644 (file)
@@ -536,9 +536,11 @@ module_rlm_t rlm_opendirectory = {
                .inst_size      = sizeof(rlm_opendirectory_t),
                .instantiate    = mod_instantiate
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 0c47b006ae87094a15f1094b5fddbbbd87e0d5e6..a9a3c5ab57e6ab7c2d880906db480e7856d7b743 100644 (file)
@@ -277,8 +277,10 @@ module_rlm_t rlm_pam = {
                .config         = module_config,
                .instantiate    = mod_instantiate
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 4c08019a116636839d3cc1489c55ee6fe674cc02..208343cedda422bb3a8def37dc48d03fbfe68896 100644 (file)
@@ -1073,14 +1073,16 @@ module_rlm_t rlm_pap = {
                .config         = module_config,
                .instantiate    = mod_instantiate
        },
-       .bindings = (module_method_binding_t[]){
-               /*
-                *      Hack to support old configurations
-                */
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate, .method_env = &pap_method_env },
-               { .section = SECTION_NAME("authorize", CF_IDENT_ANY), .method = mod_authorize, .method_env = &pap_method_env },
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_authorize, .method_env = &pap_method_env },
-
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       /*
+                        *      Hack to support old configurations
+                        */
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate, .method_env = &pap_method_env },
+                       { .section = SECTION_NAME("authorize", CF_IDENT_ANY), .method = mod_authorize, .method_env = &pap_method_env },
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_authorize, .method_env = &pap_method_env },
+
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index d295a061ced28b7ca536948f51c4c3c3c1571e32..6e28d99da533f42e8f64f819294e8a84b718cb6a 100644 (file)
@@ -616,9 +616,11 @@ module_rlm_t rlm_passwd = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_passwd_map },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_passwd_map },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
 #endif /* TEST */
index 6b08a7cfdf54969e4805517ec468f304b794535f..d181a198781ffb3eb4425be4a7b18a81df441d0e 100644 (file)
@@ -1182,18 +1182,20 @@ module_rlm_t rlm_perl = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach,
        },
-       .bindings = (module_method_binding_t[]){
-               /*
-                *      Hack to support old configurations
-                */
-               { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting },
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
-               { .section = SECTION_NAME("authorize", CF_IDENT_ANY), .method = mod_authorize },
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       /*
+                        *      Hack to support old configurations
+                        */
+                       { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting },
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
+                       { .section = SECTION_NAME("authorize", CF_IDENT_ANY), .method = mod_authorize },
 
-               { .section = SECTION_NAME("recv", "accounting-request"), .method = mod_preacct },
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize },
+                       { .section = SECTION_NAME("recv", "accounting-request"), .method = mod_preacct },
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize },
 
-               { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth },
-               MODULE_BINDING_TERMINATOR
+                       { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 6ef78a38d1e64c98850fe233da32106d8009b5e8..1ea5d2c7c3c3a34a2e0aad2a681857a5e9bf67dc 100644 (file)
@@ -1182,18 +1182,20 @@ module_rlm_t rlm_python = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach
        },
-       .bindings = (module_method_binding_t[]){
-               /*
-                *      Hack to support old configurations
-                */
-               { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting },
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
-               { .section = SECTION_NAME("authorize", CF_IDENT_ANY), .method = mod_authorize },
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       /*
+                        *      Hack to support old configurations
+                        */
+                       { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting },
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
+                       { .section = SECTION_NAME("authorize", CF_IDENT_ANY), .method = mod_authorize },
 
-               { .section = SECTION_NAME("recv", "accounting-request"), .method = mod_preacct },
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize },
+                       { .section = SECTION_NAME("recv", "accounting-request"), .method = mod_preacct },
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize },
 
-               { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth },
-               MODULE_BINDING_TERMINATOR
+                       { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index dd1a4b0ce66f5dbe63f2f652a7bf43cd80e414a2..aac7b64389d2f43f01b0ce1daffbf09a1e5378d1 100644 (file)
@@ -663,8 +663,10 @@ module_rlm_t rlm_radius = {
 
                .instantiate    = mod_instantiate,
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY),  .method = mod_process },
-               MODULE_BINDING_TERMINATOR
-       },
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_process },
+                       MODULE_BINDING_TERMINATOR
+               },
+       }
 };
index 1d516b783b88b3ca1888d93976f00d921921829d..5ee9911663f5dc76b4958ab011692352497c91e6 100644 (file)
@@ -586,8 +586,10 @@ module_rlm_t rlm_radutmp = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting, .method_env = &method_env },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting, .method_env = &method_env },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 598b0f331ae78d70331c753e5bf3de08c5bad112..025cb3cd2156d624925a3162675a809be179d6b3 100644 (file)
@@ -1291,28 +1291,30 @@ module_rlm_t rlm_redis_ippool = {
                .onload         = mod_load,
                .instantiate    = mod_instantiate
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("recv", "Access-Request"), .method = mod_alloc, .method_env = &redis_ippool_alloc_method_env },                       /* radius */
-               { .section = SECTION_NAME("accounting", "Start"), .method = mod_update, .method_env = &redis_ippool_update_method_env },                        /* radius */
-               { .section = SECTION_NAME("accounting", "Interim-Update"), .method = mod_update, .method_env = &redis_ippool_update_method_env },               /* radius */
-               { .section = SECTION_NAME("accounting", "Stop"), .method = mod_release, .method_env = &redis_ippool_release_method_env },                       /* radius */
-               { .section = SECTION_NAME("accounting", "Accounting-On"), .method = mod_bulk_release, .method_env = &redis_ippool_bulk_release_method_env },    /* radius */
-               { .section = SECTION_NAME("accounting", "Accounting-Off"), .method = mod_bulk_release, .method_env = &redis_ippool_bulk_release_method_env },   /* radius */
-
-               { .section = SECTION_NAME("recv", "Discover"), .method = mod_alloc, .method_env = &redis_ippool_alloc_method_env },                             /* dhcpv4 */
-               { .section = SECTION_NAME("recv", "Release"), .method = mod_release, .method_env = &redis_ippool_release_method_env },                          /* dhcpv4 */
-               { .section = SECTION_NAME("send", "Ack"), .method = mod_update, .method_env = &redis_ippool_update_method_env },                                /* dhcpv4 */
-
-               { .section = SECTION_NAME("recv", "Solicit"), .method = mod_alloc, .method_env = &redis_ippool_alloc_method_env },                              /* dhcpv6 */
-
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_update, .method_env = &redis_ippool_update_method_env },                         /* generic */
-               { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_alloc, .method_env = &redis_ippool_alloc_method_env },                           /* generic */
-
-               { .section = SECTION_NAME("allocate", NULL), .method = mod_alloc, .method_env = &redis_ippool_alloc_method_env },                               /* verb */
-               { .section = SECTION_NAME("update", NULL), .method = mod_update, .method_env = &redis_ippool_update_method_env },                               /* verb */
-               { .section = SECTION_NAME("renew", NULL), .method = mod_update, .method_env = &redis_ippool_update_method_env },                                /* verb */
-               { .section = SECTION_NAME("release", NULL), .method = mod_release, .method_env = &redis_ippool_release_method_env },                            /* verb */
-               { .section = SECTION_NAME("bulk-release", NULL), .method = mod_bulk_release, .method_env = &redis_ippool_bulk_release_method_env },             /* verb */
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("recv", "Access-Request"), .method = mod_alloc, .method_env = &redis_ippool_alloc_method_env },                       /* radius */
+                       { .section = SECTION_NAME("accounting", "Start"), .method = mod_update, .method_env = &redis_ippool_update_method_env },                        /* radius */
+                       { .section = SECTION_NAME("accounting", "Interim-Update"), .method = mod_update, .method_env = &redis_ippool_update_method_env },               /* radius */
+                       { .section = SECTION_NAME("accounting", "Stop"), .method = mod_release, .method_env = &redis_ippool_release_method_env },                       /* radius */
+                       { .section = SECTION_NAME("accounting", "Accounting-On"), .method = mod_bulk_release, .method_env = &redis_ippool_bulk_release_method_env },    /* radius */
+                       { .section = SECTION_NAME("accounting", "Accounting-Off"), .method = mod_bulk_release, .method_env = &redis_ippool_bulk_release_method_env },   /* radius */
+
+                       { .section = SECTION_NAME("recv", "Discover"), .method = mod_alloc, .method_env = &redis_ippool_alloc_method_env },                             /* dhcpv4 */
+                       { .section = SECTION_NAME("recv", "Release"), .method = mod_release, .method_env = &redis_ippool_release_method_env },                          /* dhcpv4 */
+                       { .section = SECTION_NAME("send", "Ack"), .method = mod_update, .method_env = &redis_ippool_update_method_env },                                /* dhcpv4 */
+
+                       { .section = SECTION_NAME("recv", "Solicit"), .method = mod_alloc, .method_env = &redis_ippool_alloc_method_env },                              /* dhcpv6 */
+
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_update, .method_env = &redis_ippool_update_method_env },                         /* generic */
+                       { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_alloc, .method_env = &redis_ippool_alloc_method_env },                           /* generic */
+
+                       { .section = SECTION_NAME("allocate", NULL), .method = mod_alloc, .method_env = &redis_ippool_alloc_method_env },                               /* verb */
+                       { .section = SECTION_NAME("update", NULL), .method = mod_update, .method_env = &redis_ippool_update_method_env },                               /* verb */
+                       { .section = SECTION_NAME("renew", NULL), .method = mod_update, .method_env = &redis_ippool_update_method_env },                                /* verb */
+                       { .section = SECTION_NAME("release", NULL), .method = mod_release, .method_env = &redis_ippool_release_method_env },                            /* verb */
+                       { .section = SECTION_NAME("bulk-release", NULL), .method = mod_bulk_release, .method_env = &redis_ippool_bulk_release_method_env },             /* verb */
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 4033098bdce4cccd30cafdc9614e6c8bc7245ae1..647daa049dc555dce237824c6780ba6c0ffc37b9 100644 (file)
@@ -257,8 +257,10 @@ module_rlm_t rlm_rediswho = {
                .onload         = mod_load,
                .instantiate    = mod_instantiate
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 323dac69d5168a10ecbefde348a41e146d8865d7..a0a7123cd2c9d447dea25f1176c234b1fe1bf778 100644 (file)
@@ -1418,17 +1418,19 @@ module_rlm_t rlm_rest = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach
        },
-       .bindings = (module_method_binding_t[]){
-               /*
-                *      Hack to support old configurations
-                */
-               { .section = SECTION_NAME("authorize", CF_IDENT_ANY),           .method = mod_authorize,        .method_env = &rest_call_env_authorize          },
-
-               { .section = SECTION_NAME("recv", "accounting-request"),        .method = mod_accounting,       .method_env = &rest_call_env_accounting         },
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY),                .method = mod_authorize,        .method_env = &rest_call_env_authorize          },
-               { .section = SECTION_NAME("accounting", CF_IDENT_ANY),          .method = mod_accounting,       .method_env = &rest_call_env_accounting         },
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY),                .method = mod_authenticate,     .method_env = &rest_call_env_authenticate       },
-               { .section = SECTION_NAME("send", CF_IDENT_ANY),                .method = mod_post_auth,        .method_env = &rest_call_env_post_auth          },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       /*
+                        *      Hack to support old configurations
+                        */
+                       { .section = SECTION_NAME("authorize", CF_IDENT_ANY), .method = mod_authorize, .method_env = &rest_call_env_authorize },
+
+                       { .section = SECTION_NAME("recv", "accounting-request"), .method = mod_accounting, .method_env = &rest_call_env_accounting },
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize, .method_env = &rest_call_env_authorize },
+                       { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting, .method_env = &rest_call_env_accounting },
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate, .method_env = &rest_call_env_authenticate },
+                       { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth, .method_env = &rest_call_env_post_auth },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index b23ad501676ed6eb090c87b87746ea97de7eb404..99b698049798aa8a02bb0cef11db71783246520c 100644 (file)
@@ -560,8 +560,10 @@ module_rlm_t rlm_securid = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index d2b2c414bc8beb675ec47ac21787e95351b3105d..4b6b2f34663ea5c06aa7f4eb68bc656f2eca9755 100644 (file)
@@ -434,8 +434,10 @@ module_rlm_t rlm_sigtran = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_authorize },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_authorize },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 8dcf707aa3b939f936143308cc6e656dc843ad13..1a7b24d5f425f2ed6a9a92b32e2e4170deb0205f 100644 (file)
@@ -1050,10 +1050,12 @@ module_rlm_t rlm_smtp = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach,
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate, .method_env = &auth_env },
-               { .section = SECTION_NAME("mail", CF_IDENT_ANY), .method = mod_mail, .method_env = &method_env },
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate, .method_env = &auth_env },
+                       { .section = SECTION_NAME("mail", CF_IDENT_ANY), .method = mod_mail, .method_env = &method_env },
 
-               MODULE_BINDING_TERMINATOR
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 06e57ed1cc80d0c055dc2d606b4843914a273e18..25b13c47e3599e11e846241f0291dd8497358846 100644 (file)
@@ -161,9 +161,11 @@ module_rlm_t rlm_sometimes = {
                .config         = module_config,
                .instantiate    = mod_instantiate
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_sometimes_reply },
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_sometimes_packet },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_sometimes_reply },
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_sometimes_packet },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 03ab4ab92fd2011336a0b7074e11901bf7836c4d..fd2d63ed42cf648b6d27b8911157a1d18c35416d 100644 (file)
@@ -2297,15 +2297,17 @@ module_rlm_t rlm_sql = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach,
        },
-       .bindings = (module_method_binding_t[]){
-               /*
-                *      Hack to support old configurations
-                */
-               { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_sql_redundant, .method_env = &accounting_method_env },
-               { .section = SECTION_NAME("authorize", CF_IDENT_ANY), .method = mod_authorize, .method_env = &authorize_method_env },
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       /*
+                        *      Hack to support old configurations
+                        */
+                       { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_sql_redundant, .method_env = &accounting_method_env },
+                       { .section = SECTION_NAME("authorize", CF_IDENT_ANY), .method = mod_authorize, .method_env = &authorize_method_env },
 
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize, .method_env = &authorize_method_env },
-               { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_sql_redundant, .method_env = &send_method_env },
-               MODULE_BINDING_TERMINATOR
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize, .method_env = &authorize_method_env },
+                       { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_sql_redundant, .method_env = &send_method_env },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 1bc7cc21b3b278573c57c448e3e61a7437f14748..ead809f43d9725b4d682977f15d748095247ad8c 100644 (file)
@@ -583,8 +583,10 @@ module_rlm_t rlm_sqlcounter = {
                .bootstrap      = mod_bootstrap,
                .instantiate    = mod_instantiate,
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_authorize, .method_env = &sqlcounter_call_env },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_authorize, .method_env = &sqlcounter_call_env },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index d054ea6688684a4c60b592a66217458401edfa4b..77d0a09cd33d96eaf715f293b6bba216a15c4d32 100644 (file)
@@ -815,45 +815,46 @@ module_rlm_t rlm_sqlippool = {
                .config         = module_config,
                .instantiate    = mod_instantiate
        },
-       .bindings = (module_method_binding_t[]){
-               /*
-                *      RADIUS specific
-                */
-               { .section = SECTION_NAME("recv", "Access-Request"), .method = mod_alloc, .method_env = &sqlippool_alloc_method_env },
-               { .section = SECTION_NAME("accounting", "Start"), .method = mod_common, .method_env = &sqlippool_update_method_env },
-               { .section = SECTION_NAME("accounting", "Alive"), .method = mod_common, .method_env = &sqlippool_update_method_env },
-               { .section = SECTION_NAME("accounting", "Stop"), .method = mod_common, .method_env = &sqlippool_release_method_env },
-               { .section = SECTION_NAME("accounting", "Accounting-On"), .method = mod_common, .method_env = &sqlippool_bulk_release_method_env },
-               { .section = SECTION_NAME("accounting", "Accounting-Off"), .method = mod_common, .method_env = &sqlippool_bulk_release_method_env },
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       /*
+                       *       RADIUS specific
+                       */
+                       { .section = SECTION_NAME("recv", "Access-Request"), .method = mod_alloc, .method_env = &sqlippool_alloc_method_env },
+                       { .section = SECTION_NAME("accounting", "Start"), .method = mod_common, .method_env = &sqlippool_update_method_env },
+                       { .section = SECTION_NAME("accounting", "Alive"), .method = mod_common, .method_env = &sqlippool_update_method_env },
+                       { .section = SECTION_NAME("accounting", "Stop"), .method = mod_common, .method_env = &sqlippool_release_method_env },
+                       { .section = SECTION_NAME("accounting", "Accounting-On"), .method = mod_common, .method_env = &sqlippool_bulk_release_method_env },
+                       { .section = SECTION_NAME("accounting", "Accounting-Off"), .method = mod_common, .method_env = &sqlippool_bulk_release_method_env },
 
-               /*
-                *      DHCPv4
-                */
-               { .section = SECTION_NAME("recv", "Discover"), .method = mod_alloc, .method_env = &sqlippool_alloc_method_env },
-               { .section = SECTION_NAME("recv", "Request"), .method = mod_common, .method_env = &sqlippool_update_method_env },
-               { .section = SECTION_NAME("recv", "Confirm"), .method = mod_common, .method_env = &sqlippool_update_method_env },
-               { .section = SECTION_NAME("recv", "Rebind"), .method = mod_common, .method_env = &sqlippool_update_method_env },
-               { .section = SECTION_NAME("recv", "Renew"), .method = mod_common, .method_env = &sqlippool_update_method_env },
-               { .section = SECTION_NAME("recv", "Release"), .method = mod_common, .method_env = &sqlippool_release_method_env },
-               { .section = SECTION_NAME("recv", "Decline"), .method = mod_common, .method_env = &sqlippool_mark_method_env },
+                       /*
+                       *       DHCPv4
+                       */
+                       { .section = SECTION_NAME("recv", "Discover"), .method = mod_alloc, .method_env = &sqlippool_alloc_method_env },
+                       { .section = SECTION_NAME("recv", "Request"), .method = mod_common, .method_env = &sqlippool_update_method_env },
+                       { .section = SECTION_NAME("recv", "Confirm"), .method = mod_common, .method_env = &sqlippool_update_method_env },
+                       { .section = SECTION_NAME("recv", "Rebind"), .method = mod_common, .method_env = &sqlippool_update_method_env },
+                       { .section = SECTION_NAME("recv", "Renew"), .method = mod_common, .method_env = &sqlippool_update_method_env },
+                       { .section = SECTION_NAME("recv", "Release"), .method = mod_common, .method_env = &sqlippool_release_method_env },
+                       { .section = SECTION_NAME("recv", "Decline"), .method = mod_common, .method_env = &sqlippool_mark_method_env },
 
-               /*
-                *      Generic
-                */
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_common, .method_env = &sqlippool_update_method_env },
-               { .section = SECTION_NAME("send", CF_IDENT_ANY),.method = mod_alloc, .method_env = &sqlippool_alloc_method_env },
+                       /*
+                       *       Generic
+                       */
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_common, .method_env = &sqlippool_update_method_env },
+                       { .section = SECTION_NAME("send", CF_IDENT_ANY),.method = mod_alloc, .method_env = &sqlippool_alloc_method_env },
 
-               /*
-                *      Named methods matching module operations
-                */
-               { .section = SECTION_NAME("allocate", NULL), .method = mod_alloc, .method_env = &sqlippool_alloc_method_env },
-               { .section = SECTION_NAME("update", NULL), .method = mod_common, .method_env = &sqlippool_update_method_env },
-               { .section = SECTION_NAME("renew", NULL), .method = mod_common, .method_env = &sqlippool_update_method_env },
-               { .section = SECTION_NAME("release", NULL), .method = mod_common, .method_env = &sqlippool_release_method_env },
-               { .section = SECTION_NAME("bulk-release", NULL), .method = mod_common, .method_env = &sqlippool_bulk_release_method_env },
-               { .section = SECTION_NAME("mark", NULL),.method = mod_common,.method_env = &sqlippool_mark_method_env },
-
-               MODULE_BINDING_TERMINATOR
+                       /*
+                       *       Named methods matching module operations
+                       */
+                       { .section = SECTION_NAME("allocate", NULL), .method = mod_alloc, .method_env = &sqlippool_alloc_method_env },
+                       { .section = SECTION_NAME("update", NULL), .method = mod_common, .method_env = &sqlippool_update_method_env },
+                       { .section = SECTION_NAME("renew", NULL), .method = mod_common, .method_env = &sqlippool_update_method_env },
+                       { .section = SECTION_NAME("release", NULL), .method = mod_common, .method_env = &sqlippool_release_method_env },
+                       { .section = SECTION_NAME("bulk-release", NULL), .method = mod_common, .method_env = &sqlippool_bulk_release_method_env },
+                       { .section = SECTION_NAME("mark", NULL),.method = mod_common,.method_env = &sqlippool_mark_method_env },
+
+                       MODULE_BINDING_TERMINATOR
+               }
        }
-
 };
index b7ec90dacc76b79b98f85644f8b8fc8e61402c72..a67fc779a3b945dca28a92939d8b9f2026d1eede 100644 (file)
@@ -458,8 +458,10 @@ module_rlm_t rlm_stats = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_stats },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_stats },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 3b49b743354c9f03da00e2eef2ca7622992f663c..594bf1e6cadc6437db3428ffe99d8817fb5a78f4 100644 (file)
@@ -264,8 +264,10 @@ module_rlm_t rlm_tacacs = {
 
                .instantiate    = mod_instantiate,
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_process },
-               MODULE_BINDING_TERMINATOR
-       },
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_process },
+                       MODULE_BINDING_TERMINATOR
+               }
+       }
 };
index c1b2845a77538da22542881d336345e15de064d6..ed05d69769358290c05f50cce2ec25f5c933ceb0 100644 (file)
@@ -528,20 +528,22 @@ module_rlm_t rlm_test = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("accounting", CF_IDENT_ANY),          .method = mod_accounting },
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY),        .method = mod_authenticate },
-               { .section = SECTION_NAME("authorize", CF_IDENT_ANY),           .method = mod_authorize },
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("accounting", CF_IDENT_ANY),          .method = mod_accounting },
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY),        .method = mod_authenticate },
+                       { .section = SECTION_NAME("authorize", CF_IDENT_ANY),           .method = mod_authorize },
 
-               { .section = SECTION_NAME("name1_null", NULL),                  .method = mod_return },
+                       { .section = SECTION_NAME("name1_null", NULL),                  .method = mod_return },
 
-               { .section = SECTION_NAME("recv", "access-challenge"),          .method = mod_return },
-               { .section = SECTION_NAME("recv", "accounting-request"),        .method = mod_preacct },
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY),                .method = mod_authorize },
+                       { .section = SECTION_NAME("recv", "access-challenge"),          .method = mod_return },
+                       { .section = SECTION_NAME("recv", "accounting-request"),        .method = mod_preacct },
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY),                .method = mod_authorize },
 
-               { .section = SECTION_NAME("retry", NULL),                       .method = mod_retry },
-               { .section = SECTION_NAME("send", CF_IDENT_ANY),                .method = mod_return },
+                       { .section = SECTION_NAME("retry", NULL),                       .method = mod_retry },
+                       { .section = SECTION_NAME("send", CF_IDENT_ANY),                .method = mod_return },
 
-               MODULE_BINDING_TERMINATOR
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 52c2471d6a41858b807d9df2d8cfbf182671c638..aef581702dc774e5094577f1da27603cc4d58c09 100644 (file)
@@ -181,8 +181,10 @@ module_rlm_t rlm_totp = {
                .config         = module_config,
                .instantiate    = mod_instantiate
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate, .method_env = &method_env },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate, .method_env = &method_env },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 9df01471e531fed839a2316aa969314f8021dd64..6114f2f0902d5cb846a3b556b04897c1e5e03273 100644 (file)
@@ -560,10 +560,12 @@ module_rlm_t rlm_unix = {
                .config         = module_config,
                .bootstrap      = mod_bootstrap
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting },
-               { .section = SECTION_NAME("recv", "Access-Request"), .method = mod_authorize },
-               { .section = SECTION_NAME("send", "Accounting-Response"), .method = mod_accounting },   /* Backwards compatibility */
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("accounting", CF_IDENT_ANY), .method = mod_accounting },
+                       { .section = SECTION_NAME("recv", "Access-Request"), .method = mod_authorize },
+                       { .section = SECTION_NAME("send", "Accounting-Response"), .method = mod_accounting },   /* Backwards compatibility */
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 969122c48f672e04805d744ab1279a0a1047e37c..e76738f7be31ff0be21ded198aae6b0420e12596 100644 (file)
@@ -60,8 +60,10 @@ module_rlm_t rlm_utf8 = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "utf8"
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY),          .method = mod_utf8_clean },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME(CF_IDENT_ANY, CF_IDENT_ANY), .method = mod_utf8_clean },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 46e4a1933ef8d9e9067084b2a31bc9771b59e176..1b92c4039e3213f85104e9cbd84cdb234af8dc9b 100644 (file)
@@ -460,10 +460,12 @@ module_rlm_t rlm_wimax = {
                .inst_size      = sizeof(rlm_wimax_t),
                .config         = module_config,
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("recv", "accounting-request"), .method = mod_preacct },
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize },
-               { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("recv", "accounting-request"), .method = mod_preacct },
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize },
+                       { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index 8d1fb7990f1f11a74cd2b0eae6c0634c1d2630ab..6185e3409f8d3dcad8df3c110b1a35ca5a13515d 100644 (file)
@@ -576,9 +576,11 @@ module_rlm_t rlm_winbind = {
                .bootstrap      = mod_bootstrap,
                .detach         = mod_detach
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate, .method_env = &winbind_auth_method_env },
-               { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize, .method_env = &winbind_autz_method_env },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate, .method_env = &winbind_auth_method_env },
+                       { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize, .method_env = &winbind_autz_method_env },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index f91c4258a8b5e1a02489e979be92a2a4f1fec621..3072080fb7a4cf06ec5ea24efa85e78bdc4d520d 100644 (file)
@@ -468,9 +468,11 @@ module_rlm_t rlm_yubikey = {
                .detach         = mod_detach,
 #endif
        },
-       .bindings = (module_method_binding_t[]){
-               { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
-               { .section = SECTION_NAME("recv", "Access-Request"), .method = mod_authorize },
-               MODULE_BINDING_TERMINATOR
+       .method = {
+               .bindings = (module_method_binding_t[]){
+                       { .section = SECTION_NAME("authenticate", CF_IDENT_ANY), .method = mod_authenticate },
+                       { .section = SECTION_NAME("recv", "Access-Request"), .method = mod_authorize },
+                       MODULE_BINDING_TERMINATOR
+               }
        }
 };
index e4270a299eb4bf46f880fb9492e2ad8207085779..085d1a6165801827fdbe0f84cc971d7cb5f63af5 100644 (file)
@@ -1,10 +1,13 @@
-#      .bindings = (module_method_binding_t[]){
-#              { .section = SECTION_NAME("recv", "Access-Challenge"),          .method = mod_return },
-#              { .section = SECTION_NAME("name1_null", NULL),                  .method = mod_return },
-#              { .section = SECTION_NAME("send", CF_IDENT_ANY),                .method = mod_return },
-#              { .section = SECTION_NAME("retry", NULL),                       .method = mod_retry },
 #
-#              MODULE_BINDING_TERMINATOR
+#      .method = {
+#              .bindings = (module_method_binding_t[]){
+#                      { .section = SECTION_NAME("recv", "Access-Challenge"),          .method = mod_return },
+#                      { .section = SECTION_NAME("name1_null", NULL),                  .method = mod_return },
+#                      { .section = SECTION_NAME("send", CF_IDENT_ANY),                .method = mod_return },
+#                      { .section = SECTION_NAME("retry", NULL),                       .method = mod_retry },
+#
+#                      MODULE_BINDING_TERMINATOR
+#              }
 #      }
 
 noop