/* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#include "array.h"
#include "password-scheme.h"
#include "auth-worker-server.h"
#include "passdb.h"
.name = "deinit"
};
{
return iface;
}
return NULL;
}
{
/* replacing a "support not compiled in" passdb */
i_panic("passdb_register_module(%s): Already registered",
}
}
{
unsigned int idx;
return;
}
}
}
const char *input, const char *input_scheme,
{
int ret;
if (auth_request->prefer_plain_credentials &&
/* we've a plaintext scheme and we prefer to get it instead
of converting it to the fallback scheme */
wanted_scheme = "";
}
if (ret <= 0) {
if (ret < 0) {
"Password data is not valid for scheme %s: %s",
} else {
"Unknown scheme %s", input_scheme);
}
return FALSE;
}
if (*wanted_scheme == '\0') {
/* anything goes. change the credentials_scheme to what we
actually got, so blocking passdbs work. */
return TRUE;
}
"Requested %s scheme, but we have only %s",
}
"%s", error);
return FALSE;
}
/* we can generate anything out of plaintext passwords */
if (!auth_request->domain_is_realm &&
/* domain must not be used as realm. add the @realm. */
}
"Generating %s from user '%s', password '%s'",
}
"Requested unknown scheme %s", wanted_scheme);
return FALSE;
}
}
return TRUE;
}
struct auth_request *auth_request)
{
if (result != PASSDB_RESULT_OK) {
return;
return;
}
&credentials, &size))
/* We're doing a passdb lookup (not authenticating).
Pass through a NULL password without an error. */
/* We already have valid credentials from an earlier
passdb lookup. auth_request_lookup_credentials_finish()
will use them. */
} else {
"Requested %s scheme, but we have a NULL password",
}
}
static struct passdb_module *
{
unsigned int i, count;
for (i = 0; i < count; i++) {
*idx_r = i;
return passdbs[i];
}
}
return NULL;
}
struct passdb_module *
{
static unsigned int auth_passdb_id = 0;
unsigned int idx;
/* maybe it's a plugin. try to load it. */
}
i_fatal("Support not compiled in for passdb driver '%s'",
}
i_fatal("passdb %s: No args are supported: %s",
}
return passdb;
else
} else {
}
} else {
}
return passdb;
}
{
passdb->init_refcount++;
}
{
unsigned int idx;
if (--passdb->init_refcount > 0)
return;
i_unreached();
/* make sure passdb isn't accessed again */
}
{
unsigned int i, count;
for (i = 0; i < count; i++) {
}
}
extern struct passdb_module_interface passdb_passwd;
extern struct passdb_module_interface passdb_bsdauth;
extern struct passdb_module_interface passdb_dict;
#ifdef HAVE_LUA
extern struct passdb_module_interface passdb_lua;
#endif
extern struct passdb_module_interface passdb_shadow;
extern struct passdb_module_interface passdb_passwd_file;
extern struct passdb_module_interface passdb_pam;
extern struct passdb_module_interface passdb_checkpassword;
extern struct passdb_module_interface passdb_vpopmail;
extern struct passdb_module_interface passdb_ldap;
extern struct passdb_module_interface passdb_sql;
extern struct passdb_module_interface passdb_sia;
extern struct passdb_module_interface passdb_static;
extern struct passdb_module_interface passdb_oauth2;
void passdbs_init(void)
{
#ifdef HAVE_LUA
#endif
}
void passdbs_deinit(void)
{
}