auth.c revision 5c73da5879d783d36849aeb2af23254b587a788b
/* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "auth.h"
#include "cookie.h"
#include <stdlib.h>
struct auth_module_list {
struct auth_module_list *next;
struct auth_module module;
};
enum auth_mech auth_mechanisms;
const char *const *auth_realms;
static int set_use_cyrus_sasl;
static struct auth_module_list *auth_modules;
static struct auth_reply_data failure_reply;
{
struct auth_module_list *list;
auth_modules = list;
}
{
return; /* not registered */
break;
}
}
}
void auth_init_request(unsigned int login_pid,
struct auth_init_request_data *request,
{
struct auth_module_list *list;
/* unsupported mechanism */
i_error("BUG: imap-login requested unsupported "
return;
}
#ifdef USE_CYRUS_SASL2
if (set_use_cyrus_sasl) {
return;
}
#endif
return;
}
}
i_unreached();
}
void auth_continue_request(unsigned int login_pid,
struct auth_continued_request_data *request,
const unsigned char *data,
{
struct cookie_data *cookie_data;
if (cookie_data == NULL) {
/* timeouted cookie */
i_error("BUG: imap-login requested cookie it didn't own");
} else {
}
}
extern struct auth_module auth_plain;
extern struct auth_module auth_digest_md5;
void auth_init(void)
{
const char *const *mechanisms;
const char *env;
auth_modules = NULL;
auth_mechanisms = 0;
/* register wanted mechanisms */
i_fatal("MECHANISMS environment is unset");
while (*mechanisms != NULL) {
else {
i_fatal("Unknown authentication mechanism '%s'",
*mechanisms);
}
mechanisms++;
}
/* get our realm - note that we allocate from data stack so
this function should never be called inside I/O loop or anywhere
else where t_pop() is called */
env = "";
#ifdef USE_CYRUS_SASL2
if (set_use_cyrus_sasl)
#endif
}
void auth_deinit(void)
{
}