passdb-shadow.c revision 827c309cc7df09ef2c77de38c88298fad07f14e5
/* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */
#include "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 */
}
{
else if (*args != '\0')
}
{
endspent();
}
struct passdb_module_interface passdb_shadow = {
"shadow",
NULL,
NULL,
};
#else
struct passdb_module_interface passdb_shadow = {
};
#endif