login-connection.c revision 44875c83e0fa7111571262686818d8de43a57b2f
/* Copyright (c) 2010-2013 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "ioloop.h"
#include "net.h"
#include "ostream.h"
#include "llist.h"
#include "master-service.h"
#include "director.h"
#include "director-request.h"
#include "auth-connection.h"
#include "login-connection.h"
#include <unistd.h>
struct login_connection {
int refcount;
int fd;
struct auth_connection *auth;
unsigned int destroyed:1;
unsigned int userdb:1;
};
struct login_host_request {
struct login_connection *conn;
};
static struct login_connection *login_connections;
{
unsigned char buf[4096];
if (ret <= 0) {
if (ret < 0) {
return;
if (errno != ECONNRESET)
i_error("read(login connection) failed: %m");
}
return;
}
}
static void
{
return;
}
static void
void *context)
{
const char *line, *line_params;
unsigned int secs;
} else {
else
i_error("director: User %s host lookup failed: %s",
"\ttemp", NULL);
}
}
{
struct login_host_request *request;
/* auth connection died -> kill also this login connection */
return;
}
else {
return;
}
/* OK <id> [<parameters>] */
/* we should always get here, but in case we don't just
forward as-is and let login process handle the error. */
args++;
}
}
}
/* with master user logins we still want to use only the
login username */
}
return;
}
/* we need to add the host. the lookup might be asynchronous */
}
struct login_connection *
{
struct login_connection *conn;
return conn;
}
{
return;
i_error("close(login connection) failed: %m");
}
{
}
void login_connections_deinit(void)
{
while (login_connections != NULL) {
}
}