1 /* @(#) $Id: ./src/os_csyslogd/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
18 #include "config/global-config.h"
19 #include "config/config.h"
22 /** void *OS_SyslogConf(int test_config, char *cfgfile,
23 SyslogConfig **syslog_config)
24 * Reads configuration.
26 void *OS_ReadSyslogConf(int test_config, char *cfgfile,
27 SyslogConfig **syslog_config)
30 GeneralConfig gen_config;
33 /* Modules for the configuration */
35 gen_config.data = syslog_config;
38 /* Reading configuration */
39 if(ReadConfig(modules, cfgfile, &gen_config, NULL) < 0)
41 ErrorExit(CONFIG_ERROR, ARGV0, cfgfile);
46 syslog_config = gen_config.data;
48 return(syslog_config);