userdb-dict.c revision 055389c58fa3915e12fb4e72ec86782ce77c5c72
/* Copyright (c) 2013-2016 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#include "userdb.h"
#include "ioloop.h"
#include "array.h"
#include "str.h"
#include "auth-cache.h"
#include "db-dict.h"
#include <dict.h>
struct dict_userdb_module {
struct userdb_module module;
struct dict_connection *conn;
};
struct dict_userdb_iterate_context {
struct userdb_iterate_context ctx;
const char *key_prefix;
unsigned int key_prefix_len;
struct dict_iterate_context *iter;
};
static int
struct db_dict_value_iter *iter)
{
}
return -1;
}
return 0;
}
{
struct dict_userdb_module *module =
(struct dict_userdb_module *)_module;
struct db_dict_value_iter *iter;
enum userdb_result userdb_result;
int ret;
"No userdb_objects or userdb_fields specified");
return;
}
&iter);
if (ret < 0)
else if (ret == 0) {
} else {
else
}
}
static struct userdb_iterate_context *
{
struct dict_userdb_module *module =
(struct dict_userdb_module *)_module;
struct dict_userdb_iterate_context *ctx;
"iterate: iterate_prefix not set");
}
}
auth_request, NULL);
}
static const char *
{
}
{
struct dict_userdb_iterate_context *ctx =
(struct dict_userdb_iterate_context *)_ctx;
else
}
{
struct dict_userdb_iterate_context *ctx =
(struct dict_userdb_iterate_context *)_ctx;
const char *error;
i_error("dict_iterate(%s) failed: %s",
ret = -1;
}
}
return ret;
}
static struct userdb_module *
{
struct dict_userdb_module *module;
struct dict_connection *conn;
}
{
struct dict_userdb_module *module =
(struct dict_userdb_module *)_module;
}
struct userdb_module_interface userdb_dict =
{
"dict",
NULL,
};