/* This file is part of GNU Dico.
Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Dico is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
#include <dicod.h>
#include <pwd.h>
#include <grp.h>
int foreground; /* Run in foreground mode */
int single_process; /* Single process mode */
/* Location of the default configuration file */
char *config_file = SYSCONFIG "/dicod.conf" ;
int config_lint_option; /* Check configuration file syntax and exit. */
/* Location of the pidfile */
char *pidfile_name = LOCALSTATEDIR "/run/dicod.pid";
/* Operation mode */
int mode = MODE_DAEMON;
/* Debug verbosity level */
int debug_level;
char *debug_level_str;
int debug_source_info;
dico_stream_t debug_stream;
/* Maximum number of children in allowed in daemon mode. */
unsigned int max_children = 64;
/* Wait this number of seconds for all subprocesses to terminate. */
unsigned int shutdown_timeout = 5;
/* Inactivity timeout */
unsigned int inactivity_timeout = 0;
/* Syslog parameters: */
int log_to_stderr; /* Log to stderr */
const char *log_tag;
int log_facility = LOG_FACILITY;
int log_print_severity;
int transcript;
/* Server information (for SHOW INFO command) */
const char *server_info;
dicod_acl_t show_sys_info;
/* This host name */
char *hostname;
/* Text of initial banner. By default == program_version */
char *initial_banner_text;
/* Alternative help text. Default - see dicod_help (commands.c) */
char *help_text;
/* List of sockets to listen on for the requests */
dico_list_t /* of struct grecs_sockaddr */ listen_addr;
/* User database for AUTH */
dico_udb_t user_db;
/* Run as this user */
uid_t user_id;
gid_t group_id;
/* Retain these supplementary groups when switching to the user privileges. */
dico_list_t /* of gid_t */ group_list;
/* List of directories to search for handler modules. */
dico_list_t /* of char * */ module_load_path;
dico_list_t /* of char * */ prepend_load_path;
/* List of configured database module instances */
dico_list_t /* of dicod_module_instance_t */ modinst_list;
/* List of configured dictionaries */
dico_list_t /* of dicod_database_t */ database_list;
/* Global Dictionary ACL */
dicod_acl_t global_acl;
/* ACL for incoming connections */
dico