X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fclient-agent%2Fconfig.c;h=a16d279fe10f68638ae5c07630b3c101e3cc7fc9;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hp=40255548a5259cf6914f498ca0abc601d1acb064;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a;p=ossec-hids.git diff --git a/src/client-agent/config.c b/src/client-agent/config.c old mode 100755 new mode 100644 index 4025554..a16d279 --- a/src/client-agent/config.c +++ b/src/client-agent/config.c @@ -1,49 +1,42 @@ -/* @(#) $Id: config.c,v 1.15 2009/06/24 17:06:24 dcid Exp $ */ - /* Copyright (C) 2009 Trend Micro Inc. * All right 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 */ - - #include "shared.h" - #include "os_xml/os_xml.h" #include "os_regex/os_regex.h" #include "os_net/os_net.h" - #include "agentd.h" +/* Global variables */ +time_t available_server; +int run_foreground; +keystore keys; +agent *agt; -/* Relocated from config_op.c */ -/* ClientConf v0.2, 2005/03/03 - * Read the config file (for the remote client) - * v0.2: New OS_XML - */ -int ClientConf(char *cfgfile) +/* Read the config file (for the remote client) */ +int ClientConf(const char *cfgfile) { int modules = 0; - logr->port = DEFAULT_SECURE; - logr->rip = NULL; - logr->lip = NULL; - logr->rip_id = 0; - logr->execdq = 0; + agt->port = DEFAULT_SECURE; + agt->rip = NULL; + agt->lip = NULL; + agt->rip_id = 0; + agt->execdq = 0; + agt->profile = NULL; - modules|= CCLIENT; + modules |= CCLIENT; - if(ReadConfig(modules, cfgfile, logr, NULL) < 0) - { - return(OS_INVALID); + if (ReadConfig(modules, cfgfile, agt, NULL) < 0) { + return (OS_INVALID); } - return(1); + return (1); } - -/* EOF */