/* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#include "passdb.h"
#ifdef PASSDB_PASSWD
#include "safe-memset.h"
#include "ipwd.h"
static enum passdb_result
{
case -1:
"getpwnam() failed: %m");
return PASSDB_RESULT_INTERNAL_FAILURE;
case 0:
return PASSDB_RESULT_USER_UNKNOWN;
}
return PASSDB_RESULT_USER_DISABLED;
}
/* save the password so cache can use it */
return PASSDB_RESULT_OK;
}
static void
{
int ret;
if (res != PASSDB_RESULT_OK) {
return;
}
/* check if the password is valid */
/* clear the passwords from memory */
if (ret <= 0) {
return;
}
/* make sure we're using the username exactly as it's in the database */
}
static void
{
if (res != PASSDB_RESULT_OK) {
return;
}
/* make sure we're using the username exactly as it's in the database */
}
static struct passdb_module *
{
else if (*args != '\0')
return module;
}
{
endpwent();
}
"passwd",
NULL,
};
#else
.name = "passwd"
};
#endif