passdb-dict.c revision 6135260095e1704ed6edff9d00bdfc043c11429c
/* Copyright (c) 2013-2014 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#include "passdb.h"
#include "array.h"
#include "str.h"
#include "var-expand.h"
#include "dict.h"
#include "password-scheme.h"
#include "auth-cache.h"
#include "db-dict.h"
#include <stdlib.h>
#include <string.h>
struct dict_passdb_module {
struct passdb_module module;
struct dict_connection *conn;
};
struct passdb_dict_request {
struct auth_request *auth_request;
union {
} callback;
};
static int
struct dict_connection *conn,
struct db_dict_value_iter *iter)
{
}
}
return -1;
}
return 0;
}
static enum passdb_result
struct dict_passdb_module *module)
{
struct db_dict_value_iter *iter;
int ret;
&iter);
if (ret < 0)
return PASSDB_RESULT_INTERNAL_FAILURE;
else if (ret == 0) {
return PASSDB_RESULT_USER_UNKNOWN;
} else {
return PASSDB_RESULT_INTERNAL_FAILURE;
"No password returned (and no nopassword)");
return PASSDB_RESULT_PASSWORD_MISMATCH;
} else {
return PASSDB_RESULT_OK;
}
}
}
{
struct dict_passdb_module *module =
(struct dict_passdb_module *)_module;
enum passdb_result passdb_result;
int ret;
"No passdb_objects or passdb_fields specified");
} else {
}
if (passdb_result == PASSDB_RESULT_OK) {
/* passdb_password may change on the way,
so we'll need to strdup. */
/* auth_request_set_field() sets scheme */
}
} else {
}
}
}
const char *password ATTR_UNUSED,
{
struct passdb_dict_request *dict_request;
}
{
struct passdb_dict_request *dict_request;
}
static struct passdb_module *
{
struct dict_passdb_module *module;
struct dict_connection *conn;
}
{
struct dict_passdb_module *module =
(struct dict_passdb_module *)_module;
}
struct passdb_module_interface passdb_dict = {
"dict",
NULL,
};