projects
/
ossec-hids.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git]
/
src
/
analysisd
/
config.c
diff --git
a/src/analysisd/config.c
b/src/analysisd/config.c
old mode 100755
(executable)
new mode 100644
(file)
index
132dce7
..
e16f63e
--- a/
src/analysisd/config.c
+++ b/
src/analysisd/config.c
@@
-1,5
+1,3
@@
-/* @(#) $Id$ */
-
/* Copyright (C) 2009 Trend Micro Inc.
* All rights reserved.
*
/* Copyright (C) 2009 Trend Micro Inc.
* All rights reserved.
*
@@
-7,42
+5,37
@@
* and/or modify it under the terms of the GNU General Public
* License (version 2) as published by the FSF - Free Software
* Foundation.
* and/or modify it under the terms of the GNU General Public
* License (version 2) as published by the FSF - Free Software
* Foundation.
- *
- * License details at the LICENSE file included with OSSEC or
- * online at: http://www.ossec.net/en/licensing.html
- */
-
-
-/* Functions to handle the configuration files
*/
*/
+/* Functions to handle the configuration files */
#include "shared.h"
#include "shared.h"
-
#include "os_xml/os_xml.h"
#include "os_regex/os_regex.h"
#include "os_xml/os_xml.h"
#include "os_regex/os_regex.h"
-
#include "analysisd.h"
#include "config.h"
#include "analysisd.h"
#include "config.h"
+long int __crt_ftell; /* Global ftell pointer */
+_Config Config; /* Global Config structure */
-/* GlobalConf vv0.2: 2005/03/03
- * v0.2: Changing to support the new OS_XML
- */
-int GlobalConf(char * cfgfile)
+int GlobalConf(const char *cfgfile)
{
int modules = 0;
{
int modules = 0;
-
/* Default values */
Config.logall = 0;
/* Default values */
Config.logall = 0;
+ Config.logall_json = 0;
Config.stats = 4;
Config.integrity = 8;
Config.rootcheck = 8;
Config.hostinfo = 8;
Config.stats = 4;
Config.integrity = 8;
Config.rootcheck = 8;
Config.hostinfo = 8;
- Config.picviz = 0;
Config.prelude = 0;
Config.prelude = 0;
- Config.memorysize = 1024;
+ Config.zeromq_output = 0;
+ Config.zeromq_output_uri = NULL;
+ Config.zeromq_output_server_cert = NULL;
+ Config.zeromq_output_client_cert = NULL;
+ Config.jsonout_output = 0;
+ Config.memorysize = 8192;
Config.mailnotify = -1;
Config.keeplogdate = 0;
Config.syscheck_alert_new = 0;
Config.mailnotify = -1;
Config.keeplogdate = 0;
Config.syscheck_alert_new = 0;
@@
-50,36
+43,33
@@
int GlobalConf(char * cfgfile)
Config.ar = 0;
Config.syscheck_ignore = NULL;
Config.ar = 0;
Config.syscheck_ignore = NULL;
- Config.white_list = NULL;
- Config.hostname_white_list = NULL;
-
+ Config.allow_list = NULL;
+ Config.hostname_allow_list = NULL;
+
/* Default actions -- only log above level 1 */
Config.mailbylevel = 7;
Config.logbylevel = 1;
/* Default actions -- only log above level 1 */
Config.mailbylevel = 7;
Config.logbylevel = 1;
+ Config.custom_alert_output = 0;
+ Config.custom_alert_output_format = NULL;
+
Config.includes = NULL;
Config.lists = NULL;
Config.decoders = NULL;
Config.includes = NULL;
Config.lists = NULL;
Config.decoders = NULL;
- modules|= CGLOBAL;
- modules|= CRULES;
- modules|= CALERTS;
-
+ modules |= CGLOBAL;
+ modules |= CRULES;
+ modules |= CALERTS;
- /* Reading config */
- if(ReadConfig(modules, cfgfile, &Config, NULL)< 0)
- {
- return(OS_INVALID);
+ /* Read config */
+ if (ReadConfig(modules, cfgfile, &Config, NULL) < 0) {
+ return (OS_INVALID);
}
/* Minimum memory size */
}
/* Minimum memory size */
- if(Config.memorysize < 64)
- Config.memorysize = 64;
-
+ if (Config.memorysize < 2048) {
+ Config.memorysize = 2048;
+ }
- return(0);
+ return (0);
}
}
-
-
-
-/* EOF */