Commit 029e6d9b authored by Romain Bignon's avatar Romain Bignon

moved 'security' parameter in config from irc/daemon to irc

parent f2b5edfe
......@@ -20,11 +20,12 @@ You can provide several configuration options to make:
* ENABLE_VIDEO=(ON|OFF) — Enable the video viewer (default=OFF). Depends on ENABLE_CACA.
* ENABLE_PLUGIN=(ON|OFF) — Compile libpurple's plugins (default=OFF).
* ENABLE_PAM=(ON|OFF) — Compile with PAM support (default=OFF).
* ENABLE_TLS=(ON|OFF) — Compile with TLS support (default=OFF).
Run:
$ make [PREFIX=path] [MAN_PREFIX=path] [CONF_PREFIX=path] [DOC_PREFIX=path]
[ENABLE_MINBIF=ON|OFF] [ENABLE_CACA=ON|OFF] [ENABLE_VIDEO=ON|OFF]
[ENABLE_PLUGIN=ON|OFF] [ENABLE_PAM=ON|OFF]
[ENABLE_PLUGIN=ON|OFF] [ENABLE_PAM=ON|OFF] [ENABLE_TLS=ON|OFF]
To install it use:
$ make install
......
......@@ -29,6 +29,9 @@ irc {
# 2: daemon fork
type = 2
# Connection security mode
#security = tls
# With 'daemon' and 'daemon fork' modes, set some
# parameters to listen on network.
daemon {
......@@ -43,9 +46,6 @@ irc {
# If this parameter is enabled, it run MinBif as a daemon.
# stdin, stdout and stderr will be also closed.
background = true
# Connection security mode
#security = tls
}
# Ping interval in seconds.
......@@ -83,14 +83,18 @@ irc {
# Authentication, Authorization and Accounting
aaa {
# Enable local user database (defaults to true)
#use_local = true
# Enable PAM authentication/authorization (need the ENABLE_PAM compile flag)
#use_pam = false
# Enable connection information for authentication/authorization
# (currently only used with TLS client certificates)
#use_connection = false
# TLS parameters (if enabled)
tls {
#trust_file = /etc/ssl/certs/ca.crt
#cert_file = /etc/minbif/server.crt
......
......@@ -60,14 +60,14 @@ Minbif::Minbif()
section->AddItem(new ConfigItem_int("type", "Type of daemon", 0, 2, "0"));
section->AddItem(new ConfigItem_int("ping", "Ping frequence (s)", 0, 65535, "60"));
section->AddItem(new ConfigItem_string("buddy_icons_url", "URL to display in /WHOIS to get a buddy icon", " "));
#ifdef HAVE_TLS
section->AddItem(new ConfigItem_string("security", "none/tls/starttls/starttls-mandatory", "none"));
#endif
ConfigSection* sub = section->AddSection("daemon", "Daemon information", MyConfig::OPTIONAL);
sub->AddItem(new ConfigItem_string("bind", "IP address to listen on"));
sub->AddItem(new ConfigItem_int("port", "Port to listen on", 1, 65535), true);
sub->AddItem(new ConfigItem_bool("background", "Start minbif in background", "true"));
#ifdef HAVE_TLS
sub->AddItem(new ConfigItem_string("security", "none/tls/starttls/starttls-mandatory", "none"));
#endif
sub = section->AddSection("oper", "Define an IRC operator", MyConfig::MULTIPLE);
sub->AddItem(new ConfigItem_string("login", "Nickname of IRC operator"), true);
......
......@@ -53,7 +53,7 @@ SockWrapper::~SockWrapper()
SockWrapper* SockWrapper::Builder(int _recv_fd, int _send_fd)
{
string sec_mode = conf.GetSection("irc")->GetSection("daemon")->GetItem("security")->String();
string sec_mode = conf.GetSection("irc")->GetItem("security")->String();
if (sec_mode.compare("none") == 0)
return new SockWrapperPlain(_recv_fd, _send_fd);
#ifdef HAVE_TLS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment