1 /* @(#) $Id: ./src/analysisd/config.c, 2011/09/08 dcid Exp $
4 /* Copyright (C) 2009 Trend Micro Inc.
7 * This program is a free software; you can redistribute it
8 * and/or modify it under the terms of the GNU General Public
9 * License (version 2) as published by the FSF - Free Software
12 * License details at the LICENSE file included with OSSEC or
13 * online at: http://www.ossec.net/en/licensing.html
17 /* Functions to handle the configuration files
23 #include "os_xml/os_xml.h"
24 #include "os_regex/os_regex.h"
26 #include "analysisd.h"
30 /* GlobalConf vv0.2: 2005/03/03
31 * v0.2: Changing to support the new OS_XML
33 int GlobalConf(char * cfgfile)
46 Config.zeromq_output = 0;
47 Config.zeromq_output_uri = NULL;
48 Config.memorysize = 1024;
49 Config.mailnotify = -1;
50 Config.keeplogdate = 0;
51 Config.syscheck_alert_new = 0;
52 Config.syscheck_auto_ignore = 1;
55 Config.syscheck_ignore = NULL;
56 Config.white_list = NULL;
57 Config.hostname_white_list = NULL;
59 /* Default actions -- only log above level 1 */
60 Config.mailbylevel = 7;
61 Config.logbylevel = 1;
63 Config.custom_alert_output =0;
64 Config.custom_alert_output_format = NULL;
66 Config.includes = NULL;
68 Config.decoders = NULL;
76 if(ReadConfig(modules, cfgfile, &Config, NULL)< 0)
81 /* Minimum memory size */
82 if(Config.memorysize < 64)
83 Config.memorysize = 64;