X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fos_maild%2Fconfig.c;h=13f2f2f6f9bfc6bde3d6f532ddd0ef1ef2904de5;hp=1f2a4320adba30976d5f17f697671835c8e42fbf;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hpb=927951d1c1ad45ba9e7325f07d996154a91c911b diff --git a/src/os_maild/config.c b/src/os_maild/config.c old mode 100755 new mode 100644 index 1f2a432..13f2f2f --- a/src/os_maild/config.c +++ b/src/os_maild/config.c @@ -1,6 +1,3 @@ -/* @(#) $Id: ./src/os_maild/config.c, 2011/09/08 dcid Exp $ - */ - /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * @@ -11,24 +8,23 @@ */ #include "shared.h" - #include "maild.h" #include "config/config.h" -/* MailConf v0.1: 2005/04/01 - * Reads the Mail configuration - */ -int MailConf(int test_config, char *cfgfile, MailConfig *Mail) +/* Read the Mail configuration */ +int MailConf(int test_config, const char *cfgfile, MailConfig *Mail) { int modules = 0; - modules|= CMAIL; + modules |= CMAIL; Mail->to = NULL; + Mail->reply_to = NULL; Mail->from = NULL; Mail->idsname = NULL; Mail->smtpserver = NULL; + Mail->heloserver = NULL; Mail->mn = 0; Mail->priority = 0; Mail->maxperhour = 12; @@ -41,23 +37,21 @@ int MailConf(int test_config, char *cfgfile, MailConfig *Mail) Mail->gran_format = NULL; Mail->groupping = 1; Mail->strict_checking = 0; -#ifdef GEOIP +#ifdef LIBGEOIP_ENABLED Mail->geoip = 0; #endif - if(ReadConfig(modules, cfgfile, NULL, Mail) < 0) - return(OS_INVALID); + if (ReadConfig(modules, cfgfile, NULL, Mail) < 0) { + return (OS_INVALID); + } - if(!Mail->mn) - { - if(!test_config) - { + if (!Mail->mn) { + if (!test_config) { verbose(MAIL_DIS, ARGV0); } exit(0); } - return(0); + return (0); } -/* EOF */