passdb-shadow.c revision 93977184658058ffee053adf5b9f13c10b5e5b21
/* Copyright (c) 2002-2010 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#include "passdb.h"
#ifdef PASSDB_SHADOW
#include "safe-memset.h"
#include <shadow.h>
#define SHADOW_CACHE_KEY "%u"
#define SHADOW_PASS_SCHEME "CRYPT"
static void
{
int ret;
return;
}
"invalid password field");
return;
}
/* save the password so cache can use it */
/* check if the password is valid */
SHADOW_PASS_SCHEME, "shadow");
/* clear the passwords from memory */
if (ret <= 0) {
return;
}
/* make sure we're using the username exactly as it's in the database */
}
{
}
{
endspent();
}
struct passdb_module_interface passdb_shadow = {
"shadow",
NULL,
NULL,
};
#else
struct passdb_module_interface passdb_shadow = {
.name = "shadow"
};
#endif