X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fos_csyslogd%2Fconfig.c;h=122abf5aecacb06c65661e9a22f5a9b0a578311a;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hp=fbeb54eae67853b39cfd557061825e4ab92221e2;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a;p=ossec-hids.git diff --git a/src/os_csyslogd/config.c b/src/os_csyslogd/config.c old mode 100755 new mode 100644 index fbeb54e..122abf5 --- a/src/os_csyslogd/config.c +++ b/src/os_csyslogd/config.c @@ -1,50 +1,36 @@ -/* @(#) $Id: config.c,v 1.2 2009/06/24 17:06:29 dcid Exp $ */ - /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * * This program is a free software; you can redistribute it * and/or modify it under the terms of the GNU General Public - * License (version 3) as published by the FSF - Free Software + * 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 = gen_config.data; + syslog_config = config.data; - return(syslog_config); + return (syslog_config); } -/* EOF */