db-sql.c revision 2e37d45867d081db150ab78dad303b9077aea24f
/* Copyright (c) 2003-2011 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#if defined(PASSDB_SQL) || defined(USERDB_SQL)
#include "settings.h"
#include "auth-request.h"
#include "db-sql.h"
#include <stddef.h>
#include <stdlib.h>
static struct setting_def setting_defs[] = {
{ 0, NULL, 0 }
};
static struct sql_settings default_sql_settings = {
.password_query = "SELECT username, domain, password FROM users WHERE username = '%n' AND domain = '%d'",
.user_query = "SELECT home, uid, gid FROM users WHERE username = '%n' AND domain = '%d'",
.update_query = "UPDATE users SET password = '%w' WHERE username = '%n' AND domain = '%d'",
.iterate_query = "SELECT username, domain FROM users",
.default_pass_scheme = "MD5"
};
{
struct sql_connection *conn;
return conn;
}
return NULL;
}
struct sql_connection *conn)
{
}
{
struct sql_connection *conn;
return conn;
}
if (*config_path == '\0')
i_fatal("sql: Configuration file path not given");
i_fatal("sql: driver not set in configuration file %s",
}
i_fatal("sql: connect string not set in configuration file %s",
}
connections = conn;
return conn;
}
{
/* abort all pending auth requests before setting conn to NULL,
so that callbacks can still access it */
return;
}
#endif