main.c revision 647afe054117804e3e156b46ada4c5bec0ac4c38
/* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "ioloop.h"
#include "network.h"
#include "lib-signals.h"
#include "restrict-access.h"
#include "auth.h"
#include "cookie.h"
#include "login-connection.h"
#include "userinfo.h"
#include <stdlib.h>
#include <syslog.h>
void master_init(void);
void master_deinit(void);
{
}
{
int fd;
if (fd != -1)
(void)login_connection_create(fd);
}
static void main_init(void)
{
const char *logfile;
/* open the syslog immediately so chroot() won't
break logging */
} else {
/* log failures into specified log file */
}
auth_init();
cookies_init();
master_init();
}
static void main_deinit(void)
{
if (lib_signal_kill != 0)
auth_deinit();
closelog();
}
{
/* NOTE: we start rooted, so keep the code minimal until
restrict_access_by_env() is called */
lib_init();
main_init();
main_deinit();
lib_deinit();
return 0;
}