passdb-static.c revision fb9b9914c9bd35a52e5d140df81e3c31f63cb8d5
/* Copyright (c) 2010-2016 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#include "passdb.h"
#include "passdb-template.h"
#include "password-scheme.h"
struct static_passdb_module {
struct passdb_module module;
struct passdb_template *tmpl;
const char *static_password_tmpl;
};
static enum passdb_result
const char **scheme_r)
{
struct static_passdb_module *module =
const char *error;
*password_r = NULL;
"Failed to expand template: %s", error);
return PASSDB_RESULT_INTERNAL_FAILURE;
}
"Failed to expand password=%s: %s",
return PASSDB_RESULT_INTERNAL_FAILURE;
}
*password_r = "";
} else {
"No password returned (and no nopassword)");
return PASSDB_RESULT_PASSWORD_MISMATCH;
}
*password_r, *scheme_r);
return PASSDB_RESULT_OK;
}
static void
{
enum passdb_result result;
const char *static_password;
const char *static_scheme;
int ret;
if (result != PASSDB_RESULT_OK) {
return;
}
if (ret <= 0) {
return;
}
}
static void
{
enum passdb_result result;
const char *static_password;
const char *static_scheme;
}
static struct passdb_module *
{
struct static_passdb_module *module;
const char *value;
}
struct passdb_module_interface passdb_static = {
"static",
NULL,
NULL,
};