]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove useless module flags
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 11 May 2024 20:37:09 +0000 (14:37 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 11 May 2024 20:37:26 +0000 (14:37 -0600)
32 files changed:
src/lib/server/module.h
src/modules/rlm_cipher/rlm_cipher.c
src/modules/rlm_client/rlm_client.c
src/modules/rlm_couchbase/rlm_couchbase.c
src/modules/rlm_exec/rlm_exec.c
src/modules/rlm_icmp/rlm_icmp.c
src/modules/rlm_idn/rlm_idn.c
src/modules/rlm_imap/rlm_imap.c
src/modules/rlm_json/rlm_json.c
src/modules/rlm_krb5/rlm_krb5.c
src/modules/rlm_lua/rlm_lua.c
src/modules/rlm_opendirectory/rlm_opendirectory.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_redis/rlm_redis.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_sigtran/rlm_sigtran.c
src/modules/rlm_smtp/rlm_smtp.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_tacacs/rlm_tacacs.c
src/modules/rlm_test/rlm_test.c
src/modules/rlm_totp/rlm_totp.c
src/modules/rlm_unbound/rlm_unbound.c
src/modules/rlm_unpack/rlm_unpack.c
src/modules/rlm_utf8/rlm_utf8.c
src/modules/rlm_wimax/rlm_wimax.c
src/modules/rlm_yubikey/rlm_yubikey.c

index 822cf53710de08009a6333ba3ecd8649e0cf0c2f..ce747be143860b2e5ae4a5231a9fb9eb165a5413 100644 (file)
@@ -47,12 +47,9 @@ typedef struct module_list_s                 module_list_t;
 
 DIAG_OFF(attributes)
 typedef enum CC_HINT(flag_enum) {
-       MODULE_TYPE_THREAD_SAFE = (0 << 0),     //!< Module is threadsafe.
-       MODULE_TYPE_THREAD_UNSAFE = (1 << 0),   //!< Module is not threadsafe.
-                                               //!< Server will protect calls with mutex.
-       MODULE_TYPE_RESUMABLE   = (1 << 2),     //!< does yield / resume
-
-       MODULE_TYPE_RETRY       = (1 << 3)      //!< can handle retries
+       MODULE_TYPE_THREAD_UNSAFE       = (1 << 0),     //!< Module is not threadsafe.
+                                                       //!< Server will protect calls with mutex.
+       MODULE_TYPE_RETRY               = (1 << 3)      //!< can handle retries
 } module_flags_t;
 DIAG_ON(attributes)
 
@@ -160,15 +157,32 @@ struct module_s {
 
        conf_parser_t const             *config;                //!< How to convert a CONF_SECTION to a module instance.
 
+       size_t                          boot_size;              //!< Size of the module's bootstrap data.
+       char const                      *boot_type;             //!< talloc type to assign to bootstrap data.
+
        size_t                          inst_size;              //!< Size of the module's instance data.
        char const                      *inst_type;             //!< talloc type to assign to instance data.
 
        module_instantiate_t            bootstrap;              //!< Callback to allow the module to register any global
                                                                ///< resources like xlat functions and attributes.
+                                                               ///< Instance data is read only during the bootstrap phase
+                                                               ///< and MUST NOT be modified.
+                                                               ///< Any attributes added during this phase that the module
+                                                               ///< need to be re-resolved during the instantiation phase
+                                                               ///< so that dynamic modules (which don't run bootstrap)
+                                                               ///< work correctly.
+                                                               ///< @note Not modifying the instance data is not just a
+                                                               ///< suggestion, if you try, you'll generate a SIGBUS
+                                                               ///< or SIGSEGV and it won't be obvious why.
+
        module_instantiate_t            instantiate;            //!< Callback to allow the module to register any
                                                                ///< per-instance resources like sockets and file handles.
-       module_detach_t                 detach;                 //!< Clean up module resources from both the bootstrap
-                                                               ///< and instantiation pahses.
+                                                               ///< After instantiate completes the module instance data
+                                                               ///< is mprotected to prevent modification.
+
+       module_detach_t                 detach;                 //!< Clean up module resources from the instantiation pahses.
+
+       module_detach_t                 unstrap;                //!< Clean up module resources from both the bootstrap phase.
 
        module_flags_t                  flags;                  //!< Flags that control how a module starts up and how
                                                                ///< a module is called.
@@ -191,11 +205,17 @@ typedef enum CC_HINT(flag_enum) {
                                                                ///< yet instantiated.
        MODULE_INSTANCE_INSTANTIATED            = (1 << 2),     //!< Module instance has been bootstrapped and
                                                                ///< instantiated.
-       MODULE_INSTANCE_NO_THREAD_INSTANCE      = (1 << 3)      //!< Not set internally, but can be used to prevent
+       MODULE_INSTANCE_NO_THREAD_INSTANTIATE   = (1 << 3)      //!< Not set internally, but can be used to prevent
                                                                ///< thread instantiation for certain modules.
 } module_instance_state_t;
 DIAG_ON(attributes)
 
+typedef struct {
+       TALLOC_CTX                      *ctx;           //!< ctx data is allocated in.
+       void                            *start;         //!< Start address which may be passed to mprotect.
+       size_t                          len;            //!< How much data we need mprotect to protect.
+} module_data_pool_t;
+
 /** Per instance data
  *
  * Per-instance data structure, to correlate the modules with the
@@ -203,21 +223,15 @@ DIAG_ON(attributes)
  * data structures.
  */
 struct module_instance_s {
-       module_instance_state_t         state;          //!< What's been done with this module so far.
+       /** @name Fields that are most frequently accessed at runtime
+       *
+       * Putting them first gives us the greatest chance of the pointers being prefetched.
+       * @{
+       */
+       void                            *data;          //!< Module's instance data.  This is most
+                                                       ///< frequently access comes first.
 
-       fr_rb_node_t                    name_node;      //!< Entry in the name tree.
-       fr_rb_node_t                    data_node;      //!< Entry in the data tree.
-
-       module_list_t                   *ml;            //!< Module list this instance belongs to.
-
-       char const                      *name;          //!< Instance name e.g. user_database.
-
-       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
-                                                       ///< is freed.  This will also (usually) unload the
-                                                       ///< .so or .dylib.
+       void                            *boot;          //!< Data allocated during the boostrap phase
 
        module_t const                  *exported;      //!< Public module structure.  Cached for convenience.
                                                        ///< This exports module methods, i.e. the functions
@@ -226,16 +240,16 @@ struct module_instance_s {
                                                        ///< but with a different type, containing additional
                                                        ///< instance callbacks to make it easier to use.
 
-       void                            *data;          //!< Module's instance data.
-       CONF_SECTION                    *conf;          //!< Module's instance configuration.
-
-       module_instance_t const         *parent;        //!< Parent module's instance (if any).
-
        pthread_mutex_t                 mutex;          //!< Used prevent multiple threads entering a thread
                                                        ///< unsafe module simultaneously.
 
-       uint32_t                        number;         //!< Unique module number.  Used to assign a stable
-                                                       ///< number to each module instance.
+       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
+                                                       ///< is freed.  This will also (usually) unload the
+                                                       ///< .so or .dylib.
+       /** @} */
 
        /** @name Return code overrides
         * @{
@@ -247,10 +261,42 @@ struct module_instance_s {
                                                        //!< has been set to true.
 
        unlang_actions_t                actions;        //!< default actions and retries.
+       /** @} */
 
+       /** @name Allow module instance data to be resolved by name or data, and to get back to the module list
+       * @{
+       */
+       module_list_t                   *ml;            //!< Module list this instance belongs to.
+       fr_rb_node_t                    name_node;      //!< Entry in the name tree.
+       fr_rb_node_t                    data_node;      //!< Entry in the data tree.
+       uint32_t                        number;         //!< Unique module number.  Used to assign a stable
+                                                       ///< number to each module instance.
+       /** @} */
+
+       /** @name These structures allow mprotect to protect/unprotest bootstrap and instance data
+       * @{
+       */
+       module_data_pool_t              inst_pool;      //!< Data to allow mprotect state toggling
+                                                       ///< for instance data.
+       module_data_pool_t              boot_pool;      //!< Data to allow mprotect state toggling
+                                                       ///< for bootstrap data.
        /** @} */
 
-       bool                            detached;       //!< Whether the detach function has been called.
+       /** @name Module instance state
+       * @{
+       */
+       module_instance_state_t         mask;           //!< Prevent phases from being executed.
+       module_instance_state_t         state;          //!< What's been done with this module so far.
+       CONF_SECTION                    *conf;          //!< Module's instance configuration.
+       /** @} */
+
+       /** @name Misc fields
+       * @{
+       */
+       char const                      *name;          //!< Instance name e.g. user_database.
+
+       module_instance_t const         *parent;        //!< Parent module's instance (if any).
+       /** @} */
 };
 
 /** Per thread per instance data
@@ -272,6 +318,42 @@ struct module_thread_instance_s {
        uint64_t                        active_callers; //! number of active callers.  i.e. number of current yields
 };
 
+/** Should we bootstrap this module instance?
+ *
+ * @param[in] mi       to check.
+ * @return
+ *     - true if the module instance should be bootstrapped.
+ *     - false if the module instance has already been bootstrapped.
+ */
+static inline bool module_instance_skip_bootstrap(module_instance_t *mi)
+{
+       return ((mi->state | mi->mask) & MODULE_INSTANCE_BOOTSTRAPPED);
+}
+
+/** Should we instantiate this module instance?
+ *
+ * @param[in] mi       to check.
+ * @return
+ *     - true if the module instance should be instantiated.
+ *     - false if the module instance has already been instantiated.
+ */
+static inline bool module_instance_skip_instantiate(module_instance_t *mi)
+{
+       return ((mi->state | mi->mask) & MODULE_INSTANCE_INSTANTIATED);
+}
+
+/** Should we instantiate this module instance in a new thread?
+ *
+ * @param[in] mi       to check.
+ * @return
+ *     - true if the module instance should be instantiated in a new thread.
+ *     - false if the module instance has already been instantiated in a new thread.
+ */
+static inline bool module_instance_skip_thread_instantiate(module_instance_t *mi)
+{
+       return ((mi->state | mi->mask) & MODULE_INSTANCE_NO_THREAD_INSTANTIATE);
+}
+
 /** Callback to retrieve thread-local data for a module
  *
  * @param[in] mi       to add data to (use mi->ml for the module list).
index 6268ad5efa4dba43672d4d966ae9e0bdf083d610..11a85327d225dbefb9b42728a0562eb4fd3ad1fc 100644 (file)
@@ -1375,7 +1375,6 @@ module_rlm_t rlm_cipher = {
        .common = {
                .magic                  = MODULE_MAGIC_INIT,
                .name                   = "cipher",
-               .flags                  = MODULE_TYPE_THREAD_SAFE,
                .inst_size              = sizeof(rlm_cipher_t),
                .thread_inst_size       = sizeof(rlm_cipher_rsa_thread_inst_t),
                .config                 = module_config,
index a6d3d24ae3a56d4e58240f819fd737b74c43c0fc..58d92d13cd82dbe463b7ce53fc18be3a9e5097c1 100644 (file)
@@ -381,7 +381,6 @@ module_rlm_t rlm_client = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "dynamic_clients",
-               .flags          = MODULE_TYPE_THREAD_SAFE,              /* type */
                .onload         = mod_load,
                .unload         = mod_unload
        },
index 76ef5913d7e8de8c6a4f446a2d903f7408e21858..67f739196158537c1ca03109b1e370a1938f58c3 100644 (file)
@@ -549,7 +549,6 @@ module_rlm_t rlm_couchbase = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "couchbase",
-               .flags          = MODULE_TYPE_THREAD_SAFE,
                .inst_size      = sizeof(rlm_couchbase_t),
                .config         = module_config,
                .onload         = mod_load,
index bd52dc9838f4a564a5af2dc71e363336f01dc156..c40c0d493c318b4b0e4e28b333575d0cab300def 100644 (file)
@@ -521,7 +521,6 @@ module_rlm_t rlm_exec = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "exec",
-               .flags          = MODULE_TYPE_THREAD_SAFE,
                .inst_size      = sizeof(rlm_exec_t),
                .config         = module_config,
                .bootstrap      = mod_bootstrap,
index 282596b5661c8f9ecec9eaedec601f0746a45cf2..13d4b5f3d1e49474035c53528284f2e4e8c1b484 100644 (file)
@@ -550,7 +550,6 @@ module_rlm_t rlm_icmp = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "icmp",
-               .flags          = MODULE_TYPE_THREAD_SAFE,
                .inst_size      = sizeof(rlm_icmp_t),
                .config         = module_config,
                .bootstrap      = mod_bootstrap,
index 15e670097272f421cbfcc24de97cb215e2014548..99f89ef2bda4f3a9d3f0b38be4355c59253956ee 100644 (file)
@@ -165,7 +165,6 @@ module_rlm_t rlm_idn = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "idn",
-               .flags          = MODULE_TYPE_THREAD_SAFE,
                .inst_size      = sizeof(rlm_idn_t),
                .config         = mod_config,
                .bootstrap      = mod_bootstrap
index ccb123b52d514f7da7ecafb74381d7fd34762a8e..9d0b6318e481c7b8fcec00a930015f993bd0280e 100644 (file)
@@ -286,7 +286,6 @@ module_rlm_t rlm_imap = {
        .common = {
                .magic                  = MODULE_MAGIC_INIT,
                .name                   = "imap",
-               .flags                  = MODULE_TYPE_THREAD_SAFE,
                .inst_size              = sizeof(rlm_imap_t),
                .thread_inst_size       = sizeof(rlm_imap_thread_t),
                .config                 = module_config,
index 53b00db25f8abe16ecf02a5afd00d7710e1a44b2..ae57a8b4d4b7154ef675fe3fb5f0e51c24bb2c1c 100644 (file)
@@ -616,7 +616,6 @@ module_rlm_t rlm_json = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "json",
-               .flags          = MODULE_TYPE_THREAD_SAFE,
                .onload         = mod_load,
                .unload         = mod_unload,
                .config         = module_config,
index bd8e8ee3c1404aac6a180859e357c6e35cbe9767..29fb67184f99c8924fc6de07b7017a48d984a9b1 100644 (file)
@@ -493,9 +493,10 @@ module_rlm_t rlm_krb5 = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "krb5",
-#ifdef KRB5_IS_THREAD_SAFE
-               .flags          = MODULE_TYPE_THREAD_SAFE,
-#else
+               /*
+                *      FIXME - Probably want a global mutex created on mod_load
+                */
+#ifndef KRB5_IS_THREAD_SAFE
                .flags          = MODULE_TYPE_THREAD_UNSAFE,
 #endif
                .inst_size      = sizeof(rlm_krb5_t),
index d279ad08037f575e43eb15dbfdab09d3bda12914..d0eacde4f263ec4545dbc34abd3095cf962f5a4f 100644 (file)
@@ -169,7 +169,6 @@ module_rlm_t rlm_lua = {
        .common = {
                .magic                  = MODULE_MAGIC_INIT,
                .name                   = "lua",
-               .flags                  = MODULE_TYPE_THREAD_SAFE,
                .inst_size              = sizeof(rlm_lua_t),
 
                .thread_inst_size       = sizeof(rlm_lua_thread_t),
index febd414b01afc83bf486e984f8d7969186e01a79..255992fb65d9385fe84047b5e488846531441a5e 100644 (file)
@@ -534,7 +534,6 @@ module_rlm_t rlm_opendirectory = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "opendirectory",
                .inst_size      = sizeof(rlm_opendirectory_t),
-               .flags          = MODULE_TYPE_THREAD_SAFE,
                .instantiate    = mod_instantiate
        },
        .method_names = (module_method_name_t[]){
index c9fe6035bbdb797c8a3641245276b124b0a2333c..627482ed7422e5b20067fc452cb10c3d752b97f4 100644 (file)
@@ -1170,7 +1170,6 @@ module_rlm_t rlm_perl = {
        .common = {
                .magic                  = MODULE_MAGIC_INIT,
                .name                   = "perl",
-               .flags                  = MODULE_TYPE_THREAD_SAFE,
                .inst_size              = sizeof(rlm_perl_t),
 
                .config                 = module_config,
index 6550e02d3d8488b8edf76564e59b31562ad9c6c4..51710fb00378fd89ae16c8596d9b265aed67571b 100644 (file)
@@ -1170,7 +1170,6 @@ module_rlm_t rlm_python = {
        .common = {
                .magic                  = MODULE_MAGIC_INIT,
                .name                   = "python",
-               .flags                  = MODULE_TYPE_THREAD_SAFE,
 
                .inst_size              = sizeof(rlm_python_t),
                .thread_inst_size       = sizeof(rlm_python_thread_t),
index 92f9e07c0298b2d803166063d1fe9327bd28a4d1..679b155dd6953541c8be10582a417b097cf27849 100644 (file)
@@ -655,7 +655,6 @@ module_rlm_t rlm_radius = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "radius",
-               .flags          = MODULE_TYPE_THREAD_SAFE | MODULE_TYPE_RESUMABLE,
                .inst_size      = sizeof(rlm_radius_t),
                .config         = module_config,
 
index 1e3820e54065d0503be013d868d9450d8c0600aa..ce4bcd6ec94e71ca5ac37c8d196e45470b7a6b70 100644 (file)
@@ -900,7 +900,6 @@ module_rlm_t rlm_redis = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "redis",
-               .flags          = MODULE_TYPE_THREAD_SAFE,
                .inst_size      = sizeof(rlm_redis_t),
                .config         = module_config,
                .onload         = mod_load,
index 787d1e438b708dbc5afdfa7cf2f3435af5f26f90..74bebba45f565698fc0de186c1ca0d4a84667920 100644 (file)
@@ -1286,7 +1286,6 @@ module_rlm_t rlm_redis_ippool = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "redis",
-               .flags          = MODULE_TYPE_THREAD_SAFE,
                .inst_size      = sizeof(rlm_redis_ippool_t),
                .config         = module_config,
                .onload         = mod_load,
index df0870f3f60a58891dc97e70529b58a0b9547585..4139e74943150abe1df84b7df540d47a9c25d01c 100644 (file)
@@ -252,7 +252,6 @@ module_rlm_t rlm_rediswho = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "rediswho",
-               .flags          = MODULE_TYPE_THREAD_SAFE,
                .inst_size      = sizeof(rlm_rediswho_t),
                .config         = module_config,
                .onload         = mod_load,
index ea128f50da40d3a7ab627151991ba8b97250d9c7..d37a6f41753e6bbc30ade6e5736b0317ad42e1ca 100644 (file)
@@ -1393,7 +1393,6 @@ module_rlm_t rlm_rest = {
        .common = {
                .magic                  = MODULE_MAGIC_INIT,
                .name                   = "rest",
-               .flags                  = MODULE_TYPE_THREAD_SAFE,
                .inst_size              = sizeof(rlm_rest_t),
                .thread_inst_size       = sizeof(rlm_rest_thread_t),
                .config                 = module_config,
index 47bf919e0b462e9fa33963fc979cdea66a561a21..bc1403226169653928e0e677737dde78453428c9 100644 (file)
@@ -426,7 +426,6 @@ module_rlm_t rlm_sigtran = {
        .common = {
                .magic                  = MODULE_MAGIC_INIT,
                .name                   = "sigtran",
-               .flags                  = MODULE_TYPE_THREAD_SAFE | MODULE_TYPE_RESUMABLE,
                .inst_size              = sizeof(rlm_sigtran_t),
                .thread_inst_size       = sizeof(rlm_sigtran_thread_t),
                .config                 = module_config,
index 7e722eed9998cb552ac3f910bb8efa6416b0e6bd..376a522b7ab47e5a1c53a3d8feee4849436fe38a 100644 (file)
@@ -1043,7 +1043,6 @@ module_rlm_t rlm_smtp = {
        .common = {
                .magic                  = MODULE_MAGIC_INIT,
                .name                   = "smtp",
-               .flags                  = MODULE_TYPE_THREAD_SAFE,
                .inst_size              = sizeof(rlm_smtp_t),
                .thread_inst_size       = sizeof(rlm_smtp_thread_t),
                .config                 = module_config,
index 6a93c463e4e7ebd44cd2073d8a43fd7cc3fa7ea8..b75c5152566db4ef81e93f4d83daaf53f3b67025 100644 (file)
@@ -1937,7 +1937,6 @@ module_rlm_t rlm_sql = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "sql",
-               .flags          = MODULE_TYPE_THREAD_SAFE,
                .inst_size      = sizeof(rlm_sql_t),
                .config         = module_config,
                .bootstrap      = mod_bootstrap,
index 6aeeb87da59b9f819cf725c9da28ac4aa1411ce6..d880d7be07f0701efbe1162fcae75c0cc0d8a3c3 100644 (file)
@@ -579,7 +579,6 @@ module_rlm_t rlm_sqlcounter = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "sqlcounter",
-               .flags          = MODULE_TYPE_THREAD_SAFE,
                .inst_size      = sizeof(rlm_sqlcounter_t),
                .config         = module_config,
                .bootstrap      = mod_bootstrap,
index 2d877488ec3bbaa7cc89484884385e7222ec74ae..44e41e7484693a2c45f49913a0cd9038d1106c8b 100644 (file)
@@ -710,7 +710,6 @@ module_rlm_t rlm_sqlippool = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "sqlippool",
-               .flags          = MODULE_TYPE_THREAD_SAFE,
                .inst_size      = sizeof(rlm_sqlippool_t),
                .config         = module_config,
                .bootstrap      = mod_bootstrap,
index d3a5d71d0f4fbf54ec52a004ead3ace587e89b9b..2fabac71c42b573197aa818d70ebb83b37afd6f0 100644 (file)
@@ -256,7 +256,6 @@ module_rlm_t rlm_tacacs = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "tacacs",
-               .flags          = MODULE_TYPE_THREAD_SAFE | MODULE_TYPE_RESUMABLE,
                .inst_size      = sizeof(rlm_tacacs_t),
                .config         = module_config,
 
index d12928183f74ec2d3773da574900dd116a8bfef6..87af5b470be061938d257e1edc23f47a96577207 100644 (file)
@@ -518,7 +518,7 @@ module_rlm_t rlm_test = {
        .common = {
                .magic                  = MODULE_MAGIC_INIT,
                .name                   = "test",
-               .flags                  = MODULE_TYPE_THREAD_SAFE | MODULE_TYPE_RETRY,
+               .flags                  = MODULE_TYPE_RETRY,
                .inst_size              = sizeof(rlm_test_t),
                .thread_inst_size       = sizeof(rlm_test_thread_t),
                .config                 = module_config,
index fe5059c6db441949c7c02c788276a29e5582f0b7..717c56171a14e769852b8d5047205aeed0b14775 100644 (file)
@@ -189,7 +189,6 @@ module_rlm_t rlm_totp = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "totp",
-               .flags          = MODULE_TYPE_THREAD_SAFE,
                .inst_size      = sizeof(rlm_totp_t),
                .config         = module_config,
                .bootstrap      = mod_bootstrap,
index 3cacc7b7428d10fc3f0120c187a829ab10399028..fbcfb5c3d34364005969fcf91c1de90b9cdd0f86 100644 (file)
@@ -507,7 +507,6 @@ module_rlm_t rlm_unbound = {
        .common = {
                .magic                  = MODULE_MAGIC_INIT,
                .name                   = "unbound",
-               .flags                  = MODULE_TYPE_THREAD_SAFE,
                .inst_size              = sizeof(rlm_unbound_t),
                .config                 = module_config,
                .bootstrap              = mod_bootstrap,
index 44998f5247f88bfeee655290e560307cf556519d..cad6d9c8bdc58c06e644b93fef195be8c634d526 100644 (file)
@@ -184,7 +184,6 @@ module_rlm_t rlm_unpack = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "unpack",
-               .flags          = MODULE_TYPE_THREAD_SAFE,
                .onload         = mod_load,
                .unload         = mod_unload
        }
index 69406dc9abe314ec133c174395203e5b7575dfa8..b59086176735cf8a07c7adb34afac21239a5dfeb 100644 (file)
@@ -58,8 +58,7 @@ extern module_rlm_t rlm_utf8;
 module_rlm_t rlm_utf8 = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
-               .name           = "utf8",
-               .flags          = MODULE_TYPE_THREAD_SAFE
+               .name           = "utf8"
        },
        .method_names = (module_method_name_t[]){
                { .name1 = CF_IDENT_ANY,        .name2 = CF_IDENT_ANY,          .method = mod_utf8_clean },
index d4d4efb43b788f2c70514ea975544935f90924ed..cd7a285c05c7af91b497c5ec4da9f83f1a652172 100644 (file)
@@ -457,7 +457,6 @@ module_rlm_t rlm_wimax = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "wimax",
-               .flags          = MODULE_TYPE_THREAD_SAFE,
                .inst_size      = sizeof(rlm_wimax_t),
                .config         = module_config,
        },
index 3a59db4356782cfedb083be3a57cf7165a41024f..4a644dd3c0903875ee3386d908b7597b449df670 100644 (file)
@@ -456,7 +456,6 @@ module_rlm_t rlm_yubikey = {
        .common = {
                .magic          = MODULE_MAGIC_INIT,
                .name           = "yubikey",
-               .flags          = MODULE_TYPE_THREAD_SAFE,
                .inst_size      = sizeof(rlm_yubikey_t),
                .onload         = mod_load,
                .unload         = mod_unload,