main.c revision 66251e6ab31e5cc153fe5cae608e416dacafe9cd
/* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "ioloop.h"
#include "lib-signals.h"
#include "restrict-access.h"
#include "auth-connection.h"
#include "master.h"
#include "client.h"
#include "ssl-proxy.h"
#include <stdlib.h>
#include <syslog.h>
unsigned int max_logging_users;
{
}
{
int fd;
if (fd == -1)
return;
}
{
if (fd == -1)
return;
if (fd_ssl == -1)
else {
}
}
static void main_init(void)
{
/* open the syslog immediately so chroot() won't
break logging */
} else {
/* log failures into specified log file */
}
/* Initialize SSL proxy before dropping privileges so it can read
the certificate and private key file. */
master_init();
clients_init();
/* we're listening for imap */
login_accept, NULL);
}
/* we're listening for imaps */
}
}
static void main_deinit(void)
{
if (lib_signal_kill != 0)
closelog();
}
{
/* NOTE: we start rooted, so keep the code minimal until
restrict_access_by_env() is called */
lib_init();
ioloop = io_loop_create();
main_init();
main_deinit();
lib_deinit();
return 0;
}