3 /* Copyright (C) 2009 Trend Micro Inc.
6 * This program is a free software; you can redistribute it
7 * and/or modify it under the terms of the GNU General Public
8 * License (version 2) as published by the FSF - Free Software
11 * License details at the LICENSE file included with OSSEC or
12 * online at: http://www.ossec.net/en/licensing.html
17 #include "config/global-config.h"
18 #include "config/config.h"
21 /** void *OS_SyslogConf(int test_config, char *cfgfile,
22 SyslogConfig **syslog_config)
23 * Reads configuration.
25 void *OS_ReadSyslogConf(int test_config, char *cfgfile,
26 SyslogConfig **syslog_config)
29 GeneralConfig gen_config;
32 /* Modules for the configuration */
34 gen_config.data = syslog_config;
37 /* Reading configuration */
38 if(ReadConfig(modules, cfgfile, &gen_config, NULL) < 0)
40 ErrorExit(CONFIG_ERROR, ARGV0, cfgfile);
45 syslog_config = gen_config.data;
47 return(syslog_config);