passdb-dict.c revision 5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294
/* Copyright (c) 2013 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#include "passdb.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 db_dict_value_iter *iter;
}
}
"Value '%s' not in valid %s format: %s",
return -1;
}
return 0;
}
static enum passdb_result
{
const char *value;
int ret;
if (ret < 0) {
return PASSDB_RESULT_INTERNAL_FAILURE;
} else if (ret == 0) {
return PASSDB_RESULT_USER_UNKNOWN;
} else {
"result: %s", value);
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;
"password_key not 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,
};