return ret;
}
-static int userdb_ldap_preinit(pool_t pool, struct event *event,
- struct userdb_module **module_r,
- const char **error_r ATTR_UNUSED)
+static int
+userdb_ldap_preinit(pool_t pool, struct event *event,
+ const struct userdb_parameters *userdb_params ATTR_UNUSED,
+ struct userdb_module **module_r,
+ const char **error_r ATTR_UNUSED)
{
const struct auth_userdb_post_settings *auth_post = NULL;
const struct ldap_post_settings *ldap_post = NULL;
static int
userdb_lua_preinit(pool_t pool, struct event *event,
+ const struct userdb_parameters *userdb_params ATTR_UNUSED,
struct userdb_module **module_r, const char **error_r)
{
struct dlua_userdb_module *module;
static int
passwd_file_preinit(pool_t pool, struct event *event,
+ const struct userdb_parameters *userdb_params ATTR_UNUSED,
struct userdb_module **module_r, const char **error_r)
{
struct passwd_file_userdb_module *module;
return ret;
}
-static int passwd_preinit(pool_t pool, struct event *event ATTR_UNUSED,
- struct userdb_module **module_r,
- const char **error_r ATTR_UNUSED)
+static int
+passwd_preinit(pool_t pool, struct event *event ATTR_UNUSED,
+ const struct userdb_parameters *userdb_params ATTR_UNUSED,
+ struct userdb_module **module_r,
+ const char **error_r ATTR_UNUSED)
{
struct passwd_userdb_module *module =
p_new(pool, struct passwd_userdb_module, 1);
static int
userdb_sql_preinit(pool_t pool, struct event *event,
+ const struct userdb_parameters *userdb_params ATTR_UNUSED,
struct userdb_module **module_r, const char **error_r)
{
struct sql_userdb_module *module;
}
}
-static int static_preinit(pool_t pool, struct event *event,
- struct userdb_module **module_r, const char **error_r)
+static int
+static_preinit(pool_t pool, struct event *event,
+ const struct userdb_parameters *userdb_params ATTR_UNUSED,
+ struct userdb_module **module_r, const char **error_r)
{
struct auth_static_settings *set;
}
if (iface->preinit != NULL) {
- if (iface->preinit(pool, event, &userdb, &error) < 0)
+ struct userdb_parameters params;
+ i_zero(¶ms);
+ if (iface->preinit(pool, event, ¶ms, &userdb, &error) < 0)
i_fatal("userdb %s: %s", set->name, error);
userdb->blocking = set->use_worker;
} else {
bool failed;
};
+struct userdb_parameters {
+};
+
struct userdb_module_interface {
const char *name;
/* Create a new userdb_module based on the settings looked up via the
given event. */
int (*preinit)(pool_t pool, struct event *event,
+ const struct userdb_parameters *userdb_params,
struct userdb_module **module_r, const char **error_r);
void (*init)(struct userdb_module *module);
void (*deinit)(struct userdb_module *module);