userdb-sql.c revision a89babcb3cb7cc96d48278a7a00f900355d4260a
/* Copyright (C) 2004 Timo Sirainen, Alex Howansky */
#include "common.h"
#ifdef USERDB_SQL
#include "str.h"
#include "strescape.h"
#include "var-expand.h"
#include "db-sql.h"
#include "userdb.h"
#include <stdlib.h>
#include <string.h>
struct sql_userdb_module {
struct userdb_module module;
struct sql_connection *conn;
};
struct userdb_sql_request {
struct auth_request *auth_request;
};
static struct auth_stream_reply *
struct auth_request *auth_request)
{
struct auth_stream_reply *reply;
unsigned int i, fields_count;
for (i = 0; i < fields_count; i++) {
continue;
/* some special handling for UID and GID. */
return NULL;
return NULL;
}
if (*name != '\0')
}
"User query didn't return uid, or it was NULL");
return NULL;
}
"User query didn't return gid, or it was NULL");
return NULL;
}
return reply;
}
struct userdb_sql_request *sql_request)
{
int ret;
if (ret < 0) {
"User query failed: %s",
} else if (ret == 0) {
} else {
}
}
static const char *
{
struct sql_userdb_module *module =
(struct sql_userdb_module *)_module;
}
{
struct sql_userdb_module *module =
(struct sql_userdb_module *)_module;
struct userdb_sql_request *sql_request;
}
static struct userdb_module *
{
struct sql_userdb_module *module;
}
const char *args __attr_unused__)
{
struct sql_userdb_module *module =
(struct sql_userdb_module *)_module;
enum sql_db_flags flags;
}
{
struct sql_userdb_module *module =
(struct sql_userdb_module *)_module;
}
struct userdb_module_interface userdb_sql = {
"sql",
};
#endif