auth.c revision e9503210d3521a6833ed62dc332fc42ffb0e7a13
/* Copyright (C) 2005 Timo Sirainen */
#include "common.h"
#include "network.h"
#include "buffer.h"
#include "str.h"
#include "mech.h"
#include "userdb.h"
#include "passdb.h"
#include "passdb-cache.h"
#include "auth.h"
#include "auth-request-handler.h"
#include <stdlib.h>
#include <unistd.h>
struct auth *auth_preinit(void)
{
unsigned int i;
t_push();
for (i = 1; ; i++) {
break;
}
t_pop();
t_push();
for (i = 1; ; i++) {
break;
}
t_pop();
i_fatal("No password databases set");
i_fatal("No user databases set");
return auth;
}
{
struct mech_module_list *list;
return str;
}
{
struct mech_module_list *list;
}
{
struct auth_passdb *passdb;
return TRUE;
}
return FALSE;
}
{
struct auth_passdb *passdb;
return TRUE;
}
return FALSE;
}
{
struct mech_module_list *list;
break;
break;
}
i_fatal("%s mechanism can't be supported with given passdbs",
}
}
{
struct auth_passdb *passdb;
struct auth_userdb *userdb;
struct mech_module *mech;
const char *const *mechanisms;
const char *env;
/* register wanted mechanisms */
i_fatal("MECHANISMS environment is unset");
while (*mechanisms != NULL) {
i_fatal("ANONYMOUS listed in mechanisms, "
"but anonymous_username not given");
}
}
i_fatal("Unknown authentication mechanism '%s'",
*mechanisms);
}
mechanisms++;
}
i_fatal("No authentication mechanisms configured");
/* 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 = "";
/* all chars are allowed */
} else {
}
}
}
{
struct auth_passdb *passdb;
struct auth_userdb *userdb;
}