/* Copyright (c) 2004-2018 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#include "userdb.h"
#ifdef USERDB_SQL
#include "auth-cache.h"
#include "db-sql.h"
#include <string.h>
struct sql_userdb_module {
};
struct userdb_sql_request {
};
struct sql_userdb_iterate_context {
};
static void
struct auth_request *auth_request)
{
unsigned int i, fields_count;
for (i = 0; i < fields_count; i++) {
}
}
}
struct userdb_sql_request *sql_request)
{
(struct sql_userdb_module *)_module;
int ret;
if (ret >= 0)
if (ret < 0) {
"User query failed: %s",
} else {
"User query failed: %s "
"(using built-in default user_query: %s)",
}
} else if (ret == 0) {
} else {
}
}
static const char *
{
(struct sql_userdb_module *)_module;
}
{
(struct sql_userdb_module *)_module;
"Failed to expand user_query=%s: %s",
return;
}
}
struct sql_userdb_iterate_context *ctx)
{
}
static struct userdb_iterate_context *
{
(struct sql_userdb_module *)_module;
"Failed to expand iterate_query=%s: %s",
}
}
const char **user_r)
{
const char *domain;
int idx;
/* try user first */
if (idx == 0) {
return 0;
}
/* username [+ domain]? */
if (idx < 0) {
/* no user or username, fail */
return -1;
}
return 0;
return 0;
}
{
(struct sql_userdb_iterate_context *)_ctx;
const char *user;
int ret;
/* query not finished yet */
return;
}
if (ret >= 0)
if (ret > 0) {
i_error("sql: Iterate query didn't return 'user' field");
i_error("sql: Iterate query returned NULL user");
else {
return;
}
} else if (ret < 0) {
i_error("sql: Iterate query failed: %s",
} else {
i_error("sql: Iterate query failed: %s "
"(using built-in default iterate_query: %s)",
}
}
}
{
(struct sql_userdb_iterate_context *)_ctx;
/* sql query hasn't finished yet */
} else {
}
return ret;
}
static struct userdb_module *
{
}
{
(struct sql_userdb_module *)_module;
}
{
(struct sql_userdb_module *)_module;
}
"sql",
};
#else
.name = "sql"
};
#endif