1 /* Copyright (C) 2009 Trend Micro Inc.
4 * This program is a free software; you can redistribute it
5 * and/or modify it under the terms of the GNU General Public
6 * License (version 2) as published by the FSF - Free Software
10 /* Functions to handle the configuration files */
13 #include "os_xml/os_xml.h"
14 #include "os_regex/os_regex.h"
15 #include "analysisd.h"
18 long int __crt_ftell; /* Global ftell pointer */
19 _Config Config; /* Global Config structure */
21 int GlobalConf(const char *cfgfile)
27 Config.logall_json = 0;
33 Config.zeromq_output = 0;
34 Config.zeromq_output_uri = NULL;
35 Config.zeromq_output_server_cert = NULL;
36 Config.zeromq_output_client_cert = NULL;
37 Config.jsonout_output = 0;
38 Config.memorysize = 8192;
39 Config.mailnotify = -1;
40 Config.keeplogdate = 0;
41 Config.syscheck_alert_new = 0;
42 Config.syscheck_auto_ignore = 1;
45 Config.syscheck_ignore = NULL;
46 Config.allow_list = NULL;
47 Config.hostname_allow_list = NULL;
49 /* Default actions -- only log above level 1 */
50 Config.mailbylevel = 7;
51 Config.logbylevel = 1;
53 Config.custom_alert_output = 0;
54 Config.custom_alert_output_format = NULL;
56 Config.includes = NULL;
58 Config.decoders = NULL;
65 if (ReadConfig(modules, cfgfile, &Config, NULL) < 0) {
69 /* Minimum memory size */
70 if (Config.memorysize < 2048) {
71 Config.memorysize = 2048;