static int
bsdauth_preinit(pool_t pool, struct event *event,
+ const struct passdb_parameters *passdb_params ATTR_UNUSED,
struct passdb_module **module_r,
const char **error_r)
{
settings_free(ldap_pre);
}
-static int passdb_ldap_preinit(pool_t pool, struct event *event,
- struct passdb_module **module_r,
- const char **error_r)
+static int
+passdb_ldap_preinit(pool_t pool, struct event *event,
+ const struct passdb_parameters *passdb_params ATTR_UNUSED,
+ struct passdb_module **module_r,
+ const char **error_r)
{
const struct auth_passdb_post_settings *auth_post = NULL;
const struct ldap_pre_settings *ldap_pre = NULL;
static int
passdb_lua_preinit(pool_t pool, struct event *event,
+ const struct passdb_parameters *passdb_params ATTR_UNUSED,
struct passdb_module **module_r, const char **error_r)
{
struct dlua_passdb_module *module;
}
static int
-oauth2_preinit(pool_t pool, struct event *event, struct passdb_module **module_r,
+oauth2_preinit(pool_t pool, struct event *event,
+ const struct passdb_parameters *passdb_params ATTR_UNUSED,
+ struct passdb_module **module_r,
const char **error_r)
{
struct oauth2_passdb_module *module;
}
-static int pam_preinit(pool_t pool, struct event *event,
- struct passdb_module **module_r, const char **error_r)
+static int
+pam_preinit(pool_t pool, struct event *event,
+ const struct passdb_parameters *passdb_params ATTR_UNUSED,
+ struct passdb_module **module_r, const char **error_r)
{
const struct auth_pam_settings *set;
const struct auth_passdb_post_settings *post_set;
static int
passwd_file_preinit(pool_t pool, struct event *event,
+ const struct passdb_parameters *passdb_params ATTR_UNUSED,
struct passdb_module **module_r, const char **error_r)
{
struct passwd_file_passdb_module *module;
PASSWD_PASS_SCHEME, callback, request);
}
-static int passwd_preinit(pool_t pool, struct event *event,
- struct passdb_module **module_r,
- const char **error_r )
+static int
+passwd_preinit(pool_t pool, struct event *event,
+ const struct passdb_parameters *passdb_params ATTR_UNUSED,
+ struct passdb_module **module_r,
+ const char **error_r)
{
const struct auth_passdb_post_settings *post_set;
struct passdb_module *module = p_new(pool, struct passdb_module, 1);
static int
passdb_sql_preinit(pool_t pool, struct event *event,
+ const struct passdb_parameters *passdb_params ATTR_UNUSED,
struct passdb_module **module_r, const char **error_r)
{
struct sql_passdb_module *module;
}
if (iface->preinit != NULL) {
- if (iface->preinit(pool, event, &passdb, &error) < 0)
+ struct passdb_parameters params;
+ i_zero(¶ms);
+ if (iface->preinit(pool, event, ¶ms, &passdb, &error) < 0)
i_fatal("passdb %s: %s", set->name, error);
passdb->default_pass_scheme =
set->default_password_scheme;
typedef void set_credentials_callback_t(bool success,
struct auth_request *request);
+struct passdb_parameters {
+};
+
struct passdb_module_interface {
const char *name;
/* Create a new passdb_module based on the settings looked up via the
given event. */
int (*preinit)(pool_t pool, struct event *event,
+ const struct passdb_parameters *passdb_params,
struct passdb_module **module_r, const char **error_r);
void (*init)(struct passdb_module *module);
void (*deinit)(struct passdb_module *module);