passdb.c revision d5abbb932a0a598f002da39a8b3326643b1b5efc
/* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */
#include "common.h"
#include "array.h"
#include "password-scheme.h"
#include "auth-worker-server.h"
#include "passdb.h"
#include <stdlib.h>
{
struct passdb_module_interface *const *ifaces;
unsigned int i, count;
for (i = 0; i < count; i++) {
return ifaces[i];
}
return NULL;
}
{
i_panic("passdb_register_module(%s): Already registered",
}
}
{
struct passdb_module_interface *const *ifaces;
unsigned int i, count;
for (i = 0; i < count; i++) {
return;
}
}
}
const char *input, const char *input_scheme,
{
const char *plaintext;
int ret;
if (ret <= 0) {
if (ret < 0) {
"Invalid password format for scheme %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;
}
const char *error = t_strdup_printf(
"Requested %s scheme, but we have only %s",
}
"%s", error);
return FALSE;
}
/* we can generate anything out of plaintext passwords */
if (!password_generate(plaintext,
"Requested unknown scheme %s", wanted_scheme);
return FALSE;
}
}
return TRUE;
}
struct auth_request *auth_request)
{
const unsigned char *credentials;
if (result != PASSDB_RESULT_OK) {
return;
}
&credentials, &size))
}
{
struct passdb_module_interface *iface;
struct auth_passdb *auth_passdb;
i_fatal("Support not compiled in for passdb driver '%s'",
driver);
}
} else {
}
return auth_passdb;
}
{
/* blocking passdb - we need an auth server */
}
}
{
}
extern struct passdb_module_interface passdb_passwd;
extern struct passdb_module_interface passdb_bsdauth;
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;
void passdbs_init(void)
{
}
void passdbs_deinit(void)
{
}