X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fos_csyslogd%2Fconfig.c;fp=src%2Fos_csyslogd%2Fconfig.c;h=122abf5aecacb06c65661e9a22f5a9b0a578311a;hp=91770e1097a9f0f8c134efbe9e7e6ca5689067e8;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hpb=927951d1c1ad45ba9e7325f07d996154a91c911b diff --git a/src/os_csyslogd/config.c b/src/os_csyslogd/config.c old mode 100755 new mode 100644 index 91770e1..122abf5 --- a/src/os_csyslogd/config.c +++ b/src/os_csyslogd/config.c @@ -1,6 +1,3 @@ -/* @(#) $Id: ./src/os_csyslogd/config.c, 2011/09/08 dcid Exp $ - */ - /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * @@ -8,44 +5,32 @@ * 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 */ - #include "csyslogd.h" #include "config/global-config.h" #include "config/config.h" -/** void *OS_SyslogConf(int test_config, char *cfgfile, - SyslogConfig **syslog_config) - * Reads configuration. - */ -void *OS_ReadSyslogConf(int test_config, char *cfgfile, - SyslogConfig **syslog_config) +/* Read configuration */ +SyslogConfig **OS_ReadSyslogConf(__attribute__((unused)) int test_config, const char *cfgfile) { int modules = 0; - GeneralConfig gen_config; - + struct SyslogConfig_holder config; + SyslogConfig **syslog_config = NULL; /* Modules for the configuration */ - modules|= CSYSLOGD; - gen_config.data = syslog_config; + modules |= CSYSLOGD; + config.data = syslog_config; - - /* Reading configuration */ - if(ReadConfig(modules, cfgfile, &gen_config, NULL) < 0) - { + /* Read configuration */ + if (ReadConfig(modules, cfgfile, &config, NULL) < 0) { ErrorExit(CONFIG_ERROR, ARGV0, cfgfile); - return(NULL); + return (NULL); } + syslog_config = config.data; - syslog_config = gen_config.data; - - return(syslog_config); + return (syslog_config); } -/* EOF */