passdb.c revision 98a711be68ba64e1cabf8cacc150af44421e2ac9
/* Copyright (C) 2002-2003 Timo Sirainen */
#include "common.h"
#include "mech.h"
#include "auth-module.h"
#include "password-scheme.h"
#include "passdb.h"
#include <stdlib.h>
#ifdef HAVE_MODULES
#endif
struct passdb_module *passdb;
static const char *
{
switch (credentials) {
break;
return "PLAIN";
case PASSDB_CREDENTIALS_CRYPT:
return "CRYPT";
return "DIGEST-MD5";
}
return "??";
}
const char *scheme,
struct auth_request *auth_request)
{
const char *wanted_scheme;
if (credentials == PASSDB_CREDENTIALS_CRYPT) {
/* anything goes */
return;
}
/* we can generate anything out of plaintext
passwords */
} else {
if (verbose) {
i_info("password(%s): Requested %s "
"scheme, but we have only %s",
}
}
}
}
}
void passdb_init(void)
{
i_fatal("PASSDB environment is unset");
#ifdef PASSDB_PASSWD
passdb = &passdb_passwd;
#endif
#ifdef PASSDB_PASSWD_FILE
#endif
#ifdef PASSDB_PAM
passdb = &passdb_pam;
#endif
#ifdef PASSDB_SHADOW
passdb = &passdb_shadow;
#endif
#ifdef PASSDB_VPOPMAIL
#endif
#ifdef PASSDB_LDAP
passdb = &passdb_ldap;
#endif
#ifdef PASSDB_PGSQL
passdb = &passdb_pgsql;
#endif
#ifdef HAVE_MODULES
if (passdb_module != NULL) {
}
#endif
/* initialize */
if ((auth_mechanisms & AUTH_MECH_PLAIN) &&
if ((auth_mechanisms & AUTH_MECH_DIGEST_MD5) &&
}
void passdb_deinit(void)
{
#ifdef HAVE_MODULES
if (passdb_module != NULL)
#endif
}