db-dict.c revision 803197abb1cc0e81abb668c026c22394bfef820d
/* Copyright (c) 2012 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#include "settings.h"
#include "dict.h"
#include "json-parser.h"
#include "str.h"
#include "auth-request.h"
#include "auth-worker-client.h"
#include "db-dict.h"
#include <stddef.h>
#include <stdlib.h>
static struct setting_def setting_defs[] = {
{ 0, NULL, 0 }
};
static struct db_dict_settings default_dict_settings = {
.password_key = "",
.user_key = "",
.iterate_prefix = "",
.iterate_disable = FALSE,
.value_format = "json",
.default_pass_scheme = "MD5"
};
{
struct dict_connection *conn;
return conn;
}
return NULL;
}
struct dict_connection *conn)
{
}
{
struct dict_connection *conn;
const char *error;
return conn;
}
if (*config_path == '\0')
i_fatal("dict: Configuration file path not given");
i_fatal("dict %s: Unsupported value_format %s in ",
}
connections = conn;
return conn;
}
{
return;
}
struct db_dict_value_iter {
struct json_parser *parser;
const char *error;
};
struct db_dict_value_iter *
{
struct db_dict_value_iter *iter;
/* hardcoded for now for JSON value. make it more modular when other
value types are supported. */
return iter;
}
{
const char *value;
return FALSE;
if (type != JSON_TYPE_OBJECT_KEY) {
return FALSE;
}
if (*value == '\0') {
return FALSE;
}
return FALSE;
}
return TRUE;
}
const char **error_r)
{
}