]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove component based module methods
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 29 Jun 2022 21:57:14 +0000 (16:57 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 30 Jun 2022 20:55:48 +0000 (15:55 -0500)
This moves us fully to the name based system of looking up modules

53 files changed:
src/lib/server/module_rlm.c
src/lib/server/module_rlm.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_logintime/rlm_logintime.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_soh/rlm_soh.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_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

index ac73a926f0b0bd907e3235f118fc89a6754ea0f3..7e0685c078ef765ec530cfa98c551469ab183f30 100644 (file)
@@ -428,14 +428,13 @@ bool module_rlm_section_type_set(request_t *request, fr_dict_attr_t const *type_
  *
  *  If the module exists but the method doesn't exist, then `method` is set to NULL.
  */
-module_instance_t *module_rlm_by_name_and_method(module_method_t *method, rlm_components_t *component,
+module_instance_t *module_rlm_by_name_and_method(module_method_t *method, UNUSED rlm_components_t *component,
                                                 char const **name1, char const **name2,
                                                 char const *name)
 {
        char                            *p, *q, *inst_name;
        size_t                          len;
        int                             j;
-       rlm_components_t                i;
        module_instance_t               *mi;
        module_method_names_t const     *methods;
        char const                      *method_name1, *method_name2;
@@ -580,14 +579,6 @@ module_instance_t *module_rlm_by_name_and_method(module_method_t *method, rlm_co
                }
 
        return_component:
-               /*
-                *      No matching method.  Just return a method
-                *      based on the component.
-                */
-               if (component && mrlm->methods[*component]) {
-                       *method = mrlm->methods[*component];
-               }
-
                /*
                 *      Didn't find a matching method.  Just return
                 *      the module.
@@ -651,37 +642,6 @@ module_instance_t *module_rlm_by_name_and_method(module_method_t *method, rlm_co
         */
        p++;
        q = strchr(p, '.');
-
-       /*
-        *      If there's only one component, look for it in the
-        *      "authorize", etc. list first.
-        */
-       if (!q) {
-               for (i = MOD_AUTHENTICATE; i < MOD_COUNT; i++) {
-                       if (strcmp(section_type_value[i], p) != 0) continue;
-
-                       /*
-                        *      Tell the caller which component was
-                        *      referenced, and set the method to the found
-                        *      function.
-                        */
-                       if (component) {
-                               *component = i;
-                               if (method) *method = mrlm->methods[*component];
-                       }
-
-                       /*
-                        *      The string matched.  Return it.  Also set the
-                        *      names so that the caller gets told the method
-                        *      name being used.
-                        */
-                       *name1 = name + (p - inst_name);
-                       *name2 = NULL;
-                       talloc_free(inst_name);
-                       return mi;
-               }
-       }
-
        /*
         *      We've found the module, but it has no named methods.
         */
index 0f86cc4397e2f7fecaf42a830dc68e84874f2db6..6b3641139b86f76188e0ca959ea94dbaeca3b286 100644 (file)
@@ -35,8 +35,6 @@ extern char const *section_type_value[MOD_COUNT];
 
 typedef struct {
        module_t                        common;                 //!< Common fields presented by all modules.
-
-       module_method_t                 methods[MOD_COUNT];     //!< Pointers to the various section callbacks.
        module_method_names_t const     *method_names;          //!< named methods
        fr_dict_t const                 **dict;                 //!< pointer to local fr_dict_t*
 } module_rlm_t;
index da1939670949321707173853bf5becd52eac137f..fdcdcd8e725feecee48950f73af12953e6eb7e4f 100644 (file)
@@ -168,11 +168,8 @@ module_rlm_t rlm_always = {
                .bootstrap      = mod_bootstrap,
                .instantiate    = mod_instantiate,
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_always_return,
-               [MOD_AUTHORIZE]         = mod_always_return,
-               [MOD_PREACCT]           = mod_always_return,
-               [MOD_ACCOUNTING]        = mod_always_return,
-               [MOD_POST_AUTH]         = mod_always_return,
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = CF_IDENT_ANY, .name2 = CF_IDENT_ANY,         .method = mod_always_return     },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 10f54784713d9b4d6318baddc155739d63531d88..bf12e4f2872f023f0f282c51743c5ffc5e037c28 100644 (file)
@@ -376,11 +376,16 @@ module_rlm_t rlm_attr_filter = {
                .config         = module_config,
                .instantiate    = mod_instantiate,
        },
-       .methods = {
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_PREACCT]           = mod_preacct,
-               [MOD_ACCOUNTING]        = mod_accounting,
-               [MOD_POST_AUTH]         = mod_post_auth,
-       },
-};
+       .method_names = (module_method_names_t[]){
+               /*
+                *      Hack to support old configurations
+                */
+               { .name1 = "authorize",         .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
 
+               { .name1 = "recv",              .name2 = "accounting-request",  .method = mod_preacct           },
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+               { .name1 = "accounting",        .name2 = CF_IDENT_ANY,          .method = mod_accounting        },
+               { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_post_auth         },
+               MODULE_NAME_TERMINATOR
+       }
+};
index 65383f71370ddfd9fcfdc90611ad7dadd62cf9da..9792a4db7b6e53ca91caf680bf3b6a282d471a1d 100644 (file)
@@ -1380,19 +1380,13 @@ module_rlm_t rlm_cache = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .methods = {
-               [MOD_AUTHORIZE]         = mod_cache_it,
-               [MOD_PREACCT]           = mod_cache_it,
-               [MOD_ACCOUNTING]        = mod_cache_it,
-               [MOD_POST_AUTH]         = mod_cache_it
-       },
        .method_names = (module_method_names_t[]){
-               { .name1 = "status", .name2 = CF_IDENT_ANY,     .method = mod_method_status },
-               { .name1 = "load", .name2 = CF_IDENT_ANY,       .method = mod_method_load   },
-               { .name1 = "store", .name2 = CF_IDENT_ANY,      .method = mod_method_store  },
-               { .name1 = "clear", .name2 = CF_IDENT_ANY,      .method = mod_method_clear  },
-               { .name1 = "ttl", .name2 = CF_IDENT_ANY,        .method = mod_method_ttl    },
-
+               { .name1 = "status", .name2 = CF_IDENT_ANY,             .method = mod_method_status },
+               { .name1 = "load", .name2 = CF_IDENT_ANY,               .method = mod_method_load   },
+               { .name1 = "store", .name2 = CF_IDENT_ANY,              .method = mod_method_store  },
+               { .name1 = "clear", .name2 = CF_IDENT_ANY,              .method = mod_method_clear  },
+               { .name1 = "ttl", .name2 = CF_IDENT_ANY,                .method = mod_method_ttl    },
+               { .name1 = CF_IDENT_ANY, .name2 = CF_IDENT_ANY,         .method = mod_cache_it      },
                MODULE_NAME_TERMINATOR
        }
 };
index e0541bc91e3fcd5b8b41804bca20856b50dba98d..4e08c49b33bf2013a3911f04b76b2aa20f393a87 100644 (file)
@@ -324,8 +324,9 @@ module_rlm_t rlm_chap = {
                .instantiate    = mod_instantiate
        },
        .dict           = &dict_radius,
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize,
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "recv",              .name2 = "access-request",      .method = mod_authorize    },
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate    },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 7a4b431be629ab17b42d3d34bfbb556395a428ee..ced01386567f7ad6b294ac966ec32a6cdd5bc075 100644 (file)
@@ -23,6 +23,7 @@
  * @copyright 2008 Alan DeKok (aland@deployingradius.com)
  * @copyright 2016 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
  */
+#include "lib/server/cf_util.h"
 RCSID("$Id$")
 
 #include <freeradius-devel/server/base.h>
@@ -383,7 +384,8 @@ module_rlm_t rlm_client = {
                .onload         = mod_load,
                .unload         = mod_unload
        },
-       .methods = {
-               [MOD_AUTHORIZE]         = mod_authorize
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = CF_IDENT_ANY, .name2 = CF_IDENT_ANY,         .method = mod_authorize   },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 813d02b20310fb38a5dfc1abb7ba80b4c6b62d55..93cdd62bd95b3384f5e21acc4522a09aa6ddf19d 100644 (file)
@@ -556,8 +556,9 @@ module_rlm_t rlm_couchbase = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .methods = {
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_ACCOUNTING]        = mod_accounting,
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "recv", .name2 = CF_IDENT_ANY,               .method = mod_authorize   },
+               { .name1 = "accounting", .name2 = CF_IDENT_ANY,         .method = mod_accounting   },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 8ca99f9c23e37db325459c381fc4b1f52312e958..0b0d820ea4de76148dd88ff992e6b751a0a7233c 100644 (file)
@@ -1062,7 +1062,6 @@ module_rlm_t rlm_csv = {
        },
        .method_names = (module_method_names_t[]){
                { .name1 = CF_IDENT_ANY,        .name2 = CF_IDENT_ANY,  .method = mod_process },
-
                MODULE_NAME_TERMINATOR
        }
 };
index 18664a4da23cb837be8a2da27ad8c120ded5d2e4..53d8501396ef657961cfbd5f27ff5943004d3034 100644 (file)
@@ -280,9 +280,8 @@ module_rlm_t rlm_delay = {
                .config         = module_config,
                .bootstrap      = mod_bootstrap
        },
-       .methods = {
-               [MOD_PREACCT]           = mod_delay,
-               [MOD_AUTHORIZE]         = mod_delay,
-               [MOD_POST_AUTH]         = mod_delay,
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = CF_IDENT_ANY,        .name2 = CF_IDENT_ANY,  .method = mod_delay },
+               MODULE_NAME_TERMINATOR
+       }
 };
index be5b7afabc11ec44345f8256ec1cd9ef393e3182..0c77049dae72c000232c005e89df1f9003e51681 100644 (file)
@@ -465,11 +465,11 @@ module_rlm_t rlm_detail = {
                .config         = module_config,
                .instantiate    = mod_instantiate
        },
-       .methods = {
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_PREACCT]           = mod_accounting,
-               [MOD_ACCOUNTING]        = mod_accounting,
-               [MOD_POST_AUTH]         = mod_post_auth,
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "recv",              .name2 = "accounting-request",  .method = mod_accounting },
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize },
+               { .name1 = "accounting",        .name2 = CF_IDENT_ANY,          .method = mod_accounting },
+               { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_post_auth },
+               MODULE_NAME_TERMINATOR
+       }
 };
-
index 70712eea040556d0d488887af4ee0d697080b1be..5a1ab6d777fe1b91ccba277eb4b02b0f55ae4534 100644 (file)
@@ -328,10 +328,6 @@ module_rlm_t rlm_dhcpv4 = {
                .thread_inst_type       = "rlm_dhcpv4_thread_t",
                .thread_instantiate     = mod_thread_instantiate
        },
-       .methods = {
-               [MOD_AUTHORIZE]         = mod_process,
-               [MOD_POST_AUTH]         = mod_process,
-       },
         .method_names = (module_method_names_t[]){
                 { .name1 = CF_IDENT_ANY,       .name2 = CF_IDENT_ANY,  .method = mod_process },
                 MODULE_NAME_TERMINATOR
index 649aafb19767142b39ca6d5a9cb2753caab393b9..5007ed9910e77d9f0ee5288dbe960500ea0238b0 100644 (file)
@@ -481,8 +481,9 @@ module_rlm_t rlm_digest = {
                .instantiate    = mod_instantiate,
        },
        .dict           = &dict_radius,
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize
-       },
+        .method_names = (module_method_names_t[]){
+                { .name1 = "recv",             .name2 = "access-request",      .method = mod_authorize },
+                { .name1 = "authenticate",     .name2 = CF_IDENT_ANY,          .method = mod_authenticate },
+                MODULE_NAME_TERMINATOR
+        },
 };
index febe5529fd5e526bd3c560fc25d7a5aa5fad999b..04c206af7a873721fbe9b239dd5cfcbabfb5c639 100644 (file)
@@ -1198,9 +1198,10 @@ module_rlm_t rlm_eap = {
                .bootstrap      = mod_bootstrap,
                .instantiate    = mod_instantiate,
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_POST_AUTH]         = mod_post_auth
-       },
+        .method_names = (module_method_names_t[]){
+                { .name1 = "recv",             .name2 = "access-request",      .method = mod_authorize },
+                { .name1 = "authenticate",     .name2 = CF_IDENT_ANY,          .method = mod_authenticate },
+                { .name1 = "send",             .name2 = CF_IDENT_ANY,          .method = mod_post_auth },
+                MODULE_NAME_TERMINATOR
+        }
 };
index e22687fe14c664cb0d665ccb8b7723c308dbea0c..1da167dc20ce571388762e1094ff45b8b6ef31f1 100644 (file)
@@ -481,11 +481,8 @@ module_rlm_t rlm_exec = {
                .bootstrap      = mod_bootstrap,
                .instantiate    = mod_instantiate
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_exec_dispatch,
-               [MOD_AUTHORIZE]         = mod_exec_dispatch,
-               [MOD_PREACCT]           = mod_exec_dispatch,
-               [MOD_ACCOUNTING]        = mod_exec_dispatch,
-               [MOD_POST_AUTH]         = mod_exec_dispatch,
-       },
+        .method_names = (module_method_names_t[]){
+                { .name1 = CF_IDENT_ANY,       .name2 = CF_IDENT_ANY,          .method = mod_exec_dispatch },
+                MODULE_NAME_TERMINATOR
+        }
 };
index 726f4e1185406ce276ceb2efe7af6e77c50e0a2b..72adeab03659eb0f2c10e03c393a54c8237a5ed3 100644 (file)
@@ -679,23 +679,16 @@ module_rlm_t rlm_files = {
                .config         = module_config,
                .instantiate    = mod_instantiate
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_PREACCT]           = mod_preacct,
-               [MOD_POST_AUTH]         = mod_post_auth
-       },
        .method_names = (module_method_names_t[]){
                /*
-                * Use mod_authorize for all DHCP processing - for consistent
-                * use of data in the file referenced by "filename"
+                *      Hack to support old configurations
                 */
-               { .name1 = "recv",      .name2 = "Discover",    .method = mod_authorize },
-               { .name1 = "recv",      .name2 = "Request",     .method = mod_authorize },
-               { .name1 = "recv",      .name2 = "Inform",      .method = mod_authorize },
-               { .name1 = "recv",      .name2 = "Release",     .method = mod_authorize },
-               { .name1 = "recv",      .name2 = "Decline",     .method = mod_authorize },
+               { .name1 = "authorize",         .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
 
+               { .name1 = "recv",              .name2 = "accounting-request",  .method = mod_preacct           },
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate      },
+               { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_post_auth         },
                MODULE_NAME_TERMINATOR
        }
 
index 312662edf88d3d8e12df9d5fc8dda056d03fdddc..79ffb4725c452f44d005a2ae47776631b78faf3c 100644 (file)
@@ -218,7 +218,8 @@ module_rlm_t rlm_imap = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach,
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 6e072f03ee7dbffdceb234cfc41d568a61e462b6..c28da76b87112f18ff03fe9c9dd5a866fc52b9d5 100644 (file)
@@ -2239,9 +2239,9 @@ module_rlm_t rlm_isc_dhcp = {
                .config         = module_config,
                .instantiate    = mod_instantiate
        },
-
-       .methods = {
-               [MOD_AUTHORIZE] = mod_authorize,
-               [MOD_POST_AUTH] = mod_post_auth,
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize },
+               { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_post_auth },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 16cc5ef1a0c56f2770139bbd33c5d637c285b5de..ab8e7e9d49d6f464c34e09f2b172183480b2fb49 100644 (file)
@@ -503,7 +503,8 @@ module_rlm_t rlm_krb5 = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate },
+               MODULE_NAME_TERMINATOR
+       }
 };
index f6ff41c69711bc758282916789ab41c4fb9147ee..88e332c2a5c60f4ae2d3b3ffa0e7fd02b8214430 100644 (file)
@@ -2031,10 +2031,16 @@ module_rlm_t rlm_ldap = {
                .thread_instantiate     = mod_thread_instatiate,
                .thread_detach          = mod_thread_detach,
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_ACCOUNTING]        = mod_accounting,
-               [MOD_POST_AUTH]         = mod_post_auth
-       },
+       .method_names = (module_method_names_t[]){
+               /*
+                *      Hack to support old configurations
+                */
+               { .name1 = "authorize",         .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+               { .name1 = "accounting",        .name2 = CF_IDENT_ANY,          .method = mod_accounting        },
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate      },
+               { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_post_auth         },
+               MODULE_NAME_TERMINATOR
+       }
 };
index d7471e89e0d9b11155d290e6c6fcb4eb1ac79d95..02e09c46342165fd3874b1ab8642a1f23f3e73a7 100644 (file)
@@ -800,11 +800,8 @@ module_rlm_t rlm_linelog = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_do_linelog,
-               [MOD_AUTHORIZE]         = mod_do_linelog,
-               [MOD_PREACCT]           = mod_do_linelog,
-               [MOD_ACCOUNTING]        = mod_do_linelog,
-               [MOD_POST_AUTH]         = mod_do_linelog,
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = CF_IDENT_ANY,        .name2 = CF_IDENT_ANY,          .method = mod_do_linelog },
+               MODULE_NAME_TERMINATOR
+       }
 };
index b6f907dd7d59b078facd5bbb3af127b0a2cb7d94..636608d5a86f7cd8e98c2de5827e7da22381f175 100644 (file)
@@ -269,8 +269,8 @@ module_rlm_t rlm_logintime = {
                .config         = module_config,
                .instantiate    = mod_instantiate
        },
-       .methods = {
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_POST_AUTH]         = mod_authorize
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = CF_IDENT_ANY,        .name2 = CF_IDENT_ANY,          .method = mod_authorize },
+               MODULE_NAME_TERMINATOR
+       }
 };
index ef4db27d9e1f637b0f51fe94110f3cc3dacce3f4..797a9d5b6dfe7ce61b87384f57d139ac9155e33a 100644 (file)
@@ -665,11 +665,8 @@ module_rlm_t rlm_logtee = {
                .instantiate            = mod_instantiate,
                .thread_instantiate     = mod_thread_instantiate,
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_insert_logtee,
-               [MOD_AUTHORIZE]         = mod_insert_logtee,
-               [MOD_PREACCT]           = mod_insert_logtee,
-               [MOD_ACCOUNTING]        = mod_insert_logtee,
-               [MOD_POST_AUTH]         = mod_insert_logtee,
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = CF_IDENT_ANY,        .name2 = CF_IDENT_ANY,          .method = mod_insert_logtee },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 8d274aeb30a44d317956a0f5a69b2ad483de6d73..8a02e54e9a65c44955161677b9b6416d9958cbb8 100644 (file)
@@ -181,11 +181,17 @@ module_rlm_t rlm_lua = {
                .detach                 = mod_detach,
                .thread_detach          = mod_thread_detach
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_PREACCT]           = mod_preacct,
-               [MOD_ACCOUNTING]        = mod_accounting,
-               [MOD_POST_AUTH]         = mod_post_auth
+       .method_names = (module_method_names_t[]){
+               /*
+                *      Hack to support old configurations
+                */
+               { .name1 = "authorize",         .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+
+               { .name1 = "recv",              .name2 = "accounting-request",  .method = mod_preacct           },
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+               { .name1 = "accounting",        .name2 = CF_IDENT_ANY,          .method = mod_accounting        },
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate      },
+               { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_post_auth         },
+               MODULE_NAME_TERMINATOR
        }
 };
index d16e9d2616976a1e38781ee2b9b34ce0b058f0e5..79d198f02732b9f2d1f834ad510ff459f4da9544 100644 (file)
@@ -517,11 +517,17 @@ module_rlm_t rlm_mruby = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach,
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_POST_AUTH]         = mod_post_auth,
-               [MOD_PREACCT]           = mod_preacct,
-               [MOD_ACCOUNTING]        = mod_accounting,
-       },
+       .method_names = (module_method_names_t[]){
+               /*
+                *      Hack to support old configurations
+                */
+               { .name1 = "authorize",         .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+
+               { .name1 = "recv",              .name2 = "accounting-request",  .method = mod_preacct           },
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+               { .name1 = "accounting",        .name2 = CF_IDENT_ANY,          .method = mod_accounting        },
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate      },
+               { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_post_auth         },
+               MODULE_NAME_TERMINATOR
+       }
 };
index da0f58af0f683551c23fb329b3b20735b4e9076c..feeb62e7edb8f8466eb529ee8d52440eb377ef74 100644 (file)
@@ -2313,8 +2313,9 @@ module_rlm_t rlm_mschap = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize },
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate },
+               MODULE_NAME_TERMINATOR
+       }
 };
index bb168ac7e1ab3b08492ab0fb43c7e7b759bf2df1..86f6a8474ae8bb0e1d5326ba27e1f7e6819068a1 100644 (file)
@@ -537,8 +537,9 @@ module_rlm_t rlm_opendirectory = {
                .type           = MODULE_TYPE_THREAD_SAFE,
                .instantiate    = mod_instantiate
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize },
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate },
+               MODULE_NAME_TERMINATOR
+       }
 };
index cd20b255654aa0bf56ff5ce5bc084ac8121e48db..85c5abb79615c6d86b2348b57326e14617d1acd2 100644 (file)
@@ -277,8 +277,8 @@ module_rlm_t rlm_pam = {
                .config         = module_config,
                .instantiate    = mod_instantiate
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate },
+               MODULE_NAME_TERMINATOR
+       }
 };
-
index 102fbbb49a4f8ba024f7abb5ee9571dc16efefbc..5ad3e2e57e27f1b2aeecb43c7b1bb63f184f4e82 100644 (file)
@@ -1082,8 +1082,14 @@ module_rlm_t rlm_pap = {
                .config         = module_config,
                .instantiate    = mod_instantiate
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize
-       },
+       .method_names = (module_method_names_t[]){
+               /*
+                *      Hack to support old configurations
+                */
+               { .name1 = "authorize",         .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate      },
+               { .name1 = CF_IDENT_ANY,        .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 06ce2695e2e447c45771bd2ccd9512c94c5b753a..7ee19cad362315d7ad25d1bbf163a9874dae9dfd 100644 (file)
@@ -618,10 +618,9 @@ module_rlm_t rlm_passwd = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .methods = {
-               [MOD_AUTHORIZE]         = mod_passwd_map,
-               [MOD_ACCOUNTING]        = mod_passwd_map,
-               [MOD_POST_AUTH]         = mod_passwd_map,
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = CF_IDENT_ANY,        .name2 = CF_IDENT_ANY,          .method = mod_passwd_map },
+               MODULE_NAME_TERMINATOR
+       }
 };
 #endif /* TEST */
index c4cedb4ed832dc5c982b554033f33b8c7f5c933c..04081d754c036f6ebd18def27482e956798d94cd 100644 (file)
@@ -1253,11 +1253,17 @@ module_rlm_t rlm_perl = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach,
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_PREACCT]           = mod_preacct,
-               [MOD_ACCOUNTING]        = mod_accounting,
-               [MOD_POST_AUTH]         = mod_post_auth,
-       },
+       .method_names = (module_method_names_t[]){
+               /*
+                *      Hack to support old configurations
+                */
+               { .name1 = "authorize",         .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+
+               { .name1 = "recv",              .name2 = "accounting-request",  .method = mod_preacct           },
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+               { .name1 = "accounting",        .name2 = CF_IDENT_ANY,          .method = mod_accounting        },
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate      },
+               { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_post_auth         },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 778c2718596c19853c1750c31fa2732b4f684be5..372cffc2b7876fd6690a75bef3929d3f068c5ad8 100644 (file)
@@ -1146,11 +1146,17 @@ module_rlm_t rlm_python = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_PREACCT]           = mod_preacct,
-               [MOD_ACCOUNTING]        = mod_accounting,
-               [MOD_POST_AUTH]         = mod_post_auth,
+       .method_names = (module_method_names_t[]){
+               /*
+                *      Hack to support old configurations
+                */
+               { .name1 = "authorize",         .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+
+               { .name1 = "recv",              .name2 = "accounting-request",  .method = mod_preacct           },
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+               { .name1 = "accounting",        .name2 = CF_IDENT_ANY,          .method = mod_accounting        },
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate      },
+               { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_post_auth         },
+               MODULE_NAME_TERMINATOR
        }
 };
index 98819eddbbc24aed59d38e972c37d87adf04acf5..3ed516ae27d35b23a2163c69302b9a92311ed357 100644 (file)
@@ -664,12 +664,6 @@ module_rlm_t rlm_radius = {
 
                .bootstrap      = mod_bootstrap,
        },
-       .methods = {
-               [MOD_PREACCT]           = mod_process,
-               [MOD_ACCOUNTING]        = mod_process,
-               [MOD_AUTHORIZE]         = mod_process,
-               [MOD_AUTHENTICATE]      = mod_process,
-       },
        .method_names = (module_method_names_t[]){
                { .name1 = CF_IDENT_ANY,        .name2 = CF_IDENT_ANY,  .method = mod_process },
                MODULE_NAME_TERMINATOR
index 2a43c8781983d3712f17f3fbd1a81d2292406703..12f0069fbb4fb9ec76248fbac7e9e2a419555115 100644 (file)
@@ -566,8 +566,8 @@ module_rlm_t rlm_radutmp = {
                .inst_size      = sizeof(rlm_radutmp_t),
                .config         = module_config
        },
-       .methods = {
-               [MOD_ACCOUNTING]        = mod_accounting,
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "accounting",        .name2 = CF_IDENT_ANY,          .method = mod_accounting },
+               MODULE_NAME_TERMINATOR
+       }
 };
-
index f8f3bb6e451bd225a1b8a6b4e3c7ebb3cebe46c8..58b0112e7e320fa3c4e35b94385a06968c066edf 100644 (file)
@@ -1437,17 +1437,24 @@ module_rlm_t rlm_redis_ippool = {
                .onload         = mod_load,
                .instantiate    = mod_instantiate
        },
-       .methods = {
-               [MOD_ACCOUNTING]        = mod_accounting,
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_POST_AUTH]         = mod_post_auth,
-       },
-       .method_names = (module_method_names_t[]) {
-               { .name1 = "recv",      .name2 = "Request",     .method = mod_request },
-               { .name1 = "recv",      .name2 = "Confirm",     .method = mod_request },
-               { .name1 = "recv",      .name2 = "Renew",       .method = mod_request },
-               { .name1 = "recv",      .name2 = "Rebind",      .method = mod_request },
-               { .name1 = "recv",      .name2 = "Release",     .method = mod_release },
+       .method_names = (module_method_names_t[]){
+               /*
+                *      RADIUS specific
+                */
+               { .name1 = "recv",              .name2 = "access-request",      .method = mod_authorize },
+               { .name1 = "accounting",        .name2 = "stop",                .method = mod_release },
+
+               /*
+                *      DHCPv4
+                */
+               { .name1 = "recv",              .name2 = "release",             .method = mod_release },
+
+               /*
+                *      Generic
+                */
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_request },
+               { .name1 = "accounting",        .name2 = CF_IDENT_ANY,          .method = mod_accounting },
+               { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_post_auth },
                MODULE_NAME_TERMINATOR
        }
 };
index 6b159bb49e4dc35bf64c1ac9d6b87ce9f8ed05a5..dacf70a566908737bbde3f0d4ff61ab32750c897 100644 (file)
@@ -258,7 +258,8 @@ module_rlm_t rlm_rediswho = {
                .onload         = mod_load,
                .instantiate    = mod_instantiate
        },
-       .methods = {
-               [MOD_ACCOUNTING]        = mod_accounting
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "accounting",        .name2 = CF_IDENT_ANY,          .method = mod_accounting },
+               MODULE_NAME_TERMINATOR
+       }
 };
index deee9f2919b28df03b346bae47c3a54d735cb6cc..94af8d9f418bcb34027701cb0e968dad8c823311 100644 (file)
@@ -1246,10 +1246,17 @@ module_rlm_t rlm_rest = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_ACCOUNTING]        = mod_accounting,
-               [MOD_POST_AUTH]         = mod_post_auth
-       },
+       .method_names = (module_method_names_t[]){
+               /*
+                *      Hack to support old configurations
+                */
+               { .name1 = "authorize",         .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+
+               { .name1 = "recv",              .name2 = "accounting-request",  .method = mod_accounting        },
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+               { .name1 = "accounting",        .name2 = CF_IDENT_ANY,          .method = mod_accounting        },
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate      },
+               { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_post_auth         },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 4bb6791fdfa0f24800d9ae6e795f89c102da1d5e..636137ba933d3d3fc785bda53b5cc73e2b1621e8 100644 (file)
@@ -560,7 +560,8 @@ module_rlm_t rlm_securid = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 6b5bb79340410175c289bdf2e5e6600ed4297bc5..3ca04a1e55aa78e984e0ac5707fd9b1c4ff56b8e 100644 (file)
@@ -435,7 +435,8 @@ module_rlm_t rlm_sigtran = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach
        },
-       .methods = {
-               [MOD_AUTHORIZE]         = mod_authorize,
+       .method_names = (module_method_names_t[]){
+               { .name1 = CF_IDENT_ANY,        .name2 = CF_IDENT_ANY,          .method = mod_authorize },
+               MODULE_NAME_TERMINATOR
        }
 };
index 661f1a28cf395c61d0c4f8c73d9fbcef520d33ba..4a6ba85d971b5d86d0cd200e67b91ffd756177ee 100644 (file)
@@ -1113,8 +1113,9 @@ module_rlm_t rlm_smtp = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach,
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize,
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize },
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 99d90055de911ee89b303075ed3140c294c275fc..ca3f6f4181f1a9898af6acbaf8525928a46b3279 100644 (file)
@@ -303,8 +303,9 @@ module_rlm_t rlm_soh = {
                .unload         = mod_unload,
                .bootstrap      = mod_bootstrap
        },
-       .methods = {
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_POST_AUTH]         = mod_post_auth
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize },
+               { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_post_auth },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 135a6fd68300de5b04d3885a457d73e463f8fe4d..96a50783ee216d248b704f49877e0ba6d4331b54 100644 (file)
@@ -162,11 +162,9 @@ module_rlm_t rlm_sometimes = {
                .config         = module_config,
                .instantiate    = mod_instantiate
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_sometimes_packet,
-               [MOD_AUTHORIZE]         = mod_sometimes_packet,
-               [MOD_PREACCT]           = mod_sometimes_packet,
-               [MOD_ACCOUNTING]        = mod_sometimes_packet,
-               [MOD_POST_AUTH]         = mod_sometimes_reply,
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_sometimes_reply },
+               { .name1 = CF_IDENT_ANY,        .name2 = CF_IDENT_ANY,          .method = mod_sometimes_packet },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 48ae1c15bc8f65dfa8562cd421c80ec21adae162..9cab330efaf0d7d2e6b7fd2eaab2b93144212a6f 100644 (file)
@@ -1620,9 +1620,15 @@ module_rlm_t rlm_sql = {
                .instantiate    = mod_instantiate,
                .detach         = mod_detach
        },
-       .methods = {
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_ACCOUNTING]        = mod_accounting,
-               [MOD_POST_AUTH]         = mod_post_auth
-       },
+       .method_names = (module_method_names_t[]){
+               /*
+                *      Hack to support old configurations
+                */
+               { .name1 = "authorize",         .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize         },
+               { .name1 = "accounting",        .name2 = CF_IDENT_ANY,          .method = mod_accounting        },
+               { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_post_auth         },
+               MODULE_NAME_TERMINATOR
+       }
 };
index c68632c8d264e26467cf12ee142821fa929897dc..46eebccfe8133b86598d761b2e489484e3b67ce7 100644 (file)
@@ -641,8 +641,8 @@ module_rlm_t rlm_sqlcounter = {
                .bootstrap      = mod_bootstrap,
                .instantiate    = mod_instantiate,
        },
-       .methods = {
-               [MOD_AUTHORIZE]         = mod_authorize
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = CF_IDENT_ANY,        .name2 = CF_IDENT_ANY,          .method = mod_authorize},
+               MODULE_NAME_TERMINATOR
+       }
 };
-
index beaf70310d6d37f98c68ca5f4c3af84270bda415..b8cd883fe157b1c4650aa43975e5d0eba271f96e 100644 (file)
@@ -865,24 +865,23 @@ module_rlm_t rlm_sqlippool = {
                .bootstrap      = mod_bootstrap,
                .instantiate    = mod_instantiate
        },
-       .methods = {
-               [MOD_ACCOUNTING]        = mod_accounting,
-               [MOD_POST_AUTH]         = mod_alloc
-       },
        .method_names = (module_method_names_t[]){
-               { .name1 = "recv",      .name2 = "Discover",    .method = mod_alloc },
-               { .name1 = "recv",      .name2 = "Request",     .method = mod_update },
-               { .name1 = "recv",      .name2 = "Confirm",     .method = mod_update },
-               { .name1 = "recv",      .name2 = "Rebind",      .method = mod_update },
-               { .name1 = "recv",      .name2 = "Renew",       .method = mod_update },
-               { .name1 = "recv",      .name2 = "Release",     .method = mod_release },
-               { .name1 = "recv",      .name2 = "Decline",     .method = mod_mark },
-
-               { .name1 = "ippool",    .name2 = "alloc",       .method = mod_alloc },
-               { .name1 = "ippool",    .name2 = "update",      .method = mod_update },
-               { .name1 = "ippool",    .name2 = "release",     .method = mod_release },
-               { .name1 = "ippool",    .name2 = "bulk-release",.method = mod_bulk_release },
-               { .name1 = "ippool",    .name2 = "mark",        .method = mod_mark },
+               { .name1 = "accounting",        .name2 = CF_IDENT_ANY,          .method = mod_accounting },
+               { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_alloc },
+
+               { .name1 = "recv",              .name2 = "Discover",            .method = mod_alloc },
+               { .name1 = "recv",              .name2 = "Request",             .method = mod_update },
+               { .name1 = "recv",              .name2 = "Confirm",             .method = mod_update },
+               { .name1 = "recv",              .name2 = "Rebind",              .method = mod_update },
+               { .name1 = "recv",              .name2 = "Renew",               .method = mod_update },
+               { .name1 = "recv",              .name2 = "Release",             .method = mod_release },
+               { .name1 = "recv",              .name2 = "Decline",             .method = mod_mark },
+
+               { .name1 = "ippool",            .name2 = "alloc",               .method = mod_alloc },
+               { .name1 = "ippool",            .name2 = "update",              .method = mod_update },
+               { .name1 = "ippool",            .name2 = "release",             .method = mod_release },
+               { .name1 = "ippool",            .name2 = "bulk-release",        .method = mod_bulk_release },
+               { .name1 = "ippool",            .name2 = "mark",                .method = mod_mark },
 
                MODULE_NAME_TERMINATOR
        }
index fbdafef9f3cf46e9d66ea76cb730859340dbbc30..87be64dbbedbf8d2c0ec14d8805db2229f9da099 100644 (file)
@@ -446,9 +446,8 @@ module_rlm_t rlm_stats = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach
        },
-       .methods = {
-               [MOD_AUTHORIZE]         = mod_stats, /* @mod_stats_query */
-               [MOD_POST_AUTH]         = mod_stats,
-               [MOD_ACCOUNTING]        = mod_stats,
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = CF_IDENT_ANY,        .name2 = CF_IDENT_ANY,          .method = mod_stats },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 1469db485a72bedbbc6cef1735809f6ca046dd57..1b3d0bd94778e619cf5e8bc172ac0b5ea350075b 100644 (file)
@@ -519,14 +519,13 @@ module_rlm_t rlm_test = {
                .thread_instantiate     = mod_thread_instantiate,
                .thread_detach          = mod_thread_detach
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_PREACCT]           = mod_preacct,
-               [MOD_ACCOUNTING]        = mod_accounting,
-       },
        .method_names = (module_method_names_t[]){
-               { .name1 = "recv",              .name2 = "Access-Challenge",    .method = mod_return },
+               { .name1 = "recv",              .name2 = "accounting-request",  .method = mod_preacct },
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize },
+               { .name1 = "accounting",        .name2 = CF_IDENT_ANY,          .method = mod_accounting },
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate },
+
+               { .name1 = "recv",              .name2 = "access-challenge",    .method = mod_return },
                { .name1 = "name1_null",        .name2 = NULL,                  .method = mod_return },
                { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_return },
                { .name1 = "retry",             .name2 = NULL,                  .method = mod_retry },
index 0c652162bb003925ff1a067f4d23ff5bab3526ab..4a1f840c7671e8288200d13ec5efe3493f2b5684 100644 (file)
@@ -293,9 +293,10 @@ module_rlm_t rlm_totp = {
                .name           = "totp",
                .type           = MODULE_TYPE_THREAD_SAFE
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate },
+               MODULE_NAME_TERMINATOR
+       }
 };
 
 #else /* TESTING */
index 8771c4d8d0565bcb631fa22745b4269265be798a..ffcc41f01417f57b67359077aaefb3305a6bcae3 100644 (file)
@@ -516,8 +516,9 @@ module_rlm_t rlm_unix = {
                .config         = module_config,
                .bootstrap      = mod_bootstrap
        },
-       .methods = {
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_ACCOUNTING]        = mod_accounting
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "recv",              .name2 = "access-request",      .method = mod_authorize },
+               { .name1 = "accounting",        .name2 = CF_IDENT_ANY,          .method = mod_accounting },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 87056ca4b8d3d6c7c7f7ec0faf7c63c6475a10ad..0f92f67b00a31ce746ac74b689a17adab215d594 100644 (file)
@@ -64,8 +64,8 @@ module_rlm_t rlm_utf8 = {
                .name           = "utf8",
                .type           = MODULE_TYPE_THREAD_SAFE
        },
-       .methods = {
-               [MOD_AUTHORIZE]         = mod_utf8_clean,
-               [MOD_PREACCT]           = mod_utf8_clean,
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = CF_IDENT_ANY,        .name2 = CF_IDENT_ANY,          .method = mod_utf8_clean },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 5e4feb8d285a8e906519ba5ae287900159666ae8..fa95b8f756fa1dcb883af295d47b19eeb470aa64 100644 (file)
@@ -463,9 +463,10 @@ module_rlm_t rlm_wimax = {
                .config         = module_config,
        },
        .dict           = &dict_radius,
-       .methods = {
-               [MOD_AUTHORIZE]         = mod_authorize,
-               [MOD_PREACCT]           = mod_preacct,
-               [MOD_POST_AUTH]         = mod_post_auth
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "recv",              .name2 = "accounting-request",  .method = mod_preacct },
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize },
+               { .name1 = "send",              .name2 = CF_IDENT_ANY,          .method = mod_post_auth },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 104cfbb76d57ea7053c5d99f11a60fc6ec6753ae..829356202493682f11e622a1301f806836efb9a0 100644 (file)
@@ -565,8 +565,9 @@ module_rlm_t rlm_winbind = {
                .bootstrap      = mod_bootstrap,
                .detach         = mod_detach
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "recv",              .name2 = CF_IDENT_ANY,          .method = mod_authorize },
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate },
+               MODULE_NAME_TERMINATOR
+       }
 };
index 5b388015307e0422b68a2fd0a3e7739e0df2a5b9..04192f504ce92b4b352f14fc2cf948a26b42b932 100644 (file)
@@ -470,8 +470,9 @@ module_rlm_t rlm_yubikey = {
                .detach         = mod_detach,
 #endif
        },
-       .methods = {
-               [MOD_AUTHENTICATE]      = mod_authenticate,
-               [MOD_AUTHORIZE]         = mod_authorize
-       },
+       .method_names = (module_method_names_t[]){
+               { .name1 = "recv",              .name2 = "access-request",      .method = mod_authorize },
+               { .name1 = "authenticate",      .name2 = CF_IDENT_ANY,          .method = mod_authenticate },
+               MODULE_NAME_TERMINATOR
+       }
 };