userdb-sql.c revision 66d2db642fe24d555d113ba463e446b038d476ef
/* Copyright (C) 2004 Timo Sirainen, Alex Howansky */
#include "config.h"
#ifdef USERDB_SQL
#include "common.h"
#include "str.h"
#include "strescape.h"
#include "var-expand.h"
#include "db-sql.h"
#include "userdb.h"
#include <stdlib.h>
#include <string.h>
struct userdb_sql_request {
struct auth_request *auth_request;
};
extern struct userdb_module userdb_sql;
static struct sql_connection *userdb_sql_conn;
struct auth_request *auth_request)
{
unsigned int i, fields_count;
for (i = 0; i < fields_count; i++) {
continue;
/* some special handling for UID and GID. */
return NULL;
return NULL;
}
}
"Password query didn't return uid, or it was NULL");
}
"Password query didn't return gid, or it was NULL");
}
}
{
const char *user_result = NULL;
int ret;
if (ret < 0) {
} else if (ret == 0) {
} else {
}
}
{
struct userdb_sql_request *sql_request;
str_escape));
}
static void userdb_sql_preinit(const char *args)
{
}
{
enum sql_db_flags flags;
}
static void userdb_sql_deinit(void)
{
}
struct userdb_module userdb_sql = {
"sql",
};
#endif