X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fclient-agent%2Fconfig.c;h=a16d279fe10f68638ae5c07630b3c101e3cc7fc9;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hp=7d6d1517ef060d69c8971fbb21520eb3ec140858;hpb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;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 7d6d151..a16d279 --- a/src/client-agent/config.c +++ b/src/client-agent/config.c @@ -1,6 +1,3 @@ -/* @(#) $Id: ./src/client-agent/config.c, 2011/09/08 dcid Exp $ - */ - /* Copyright (C) 2009 Trend Micro Inc. * All right reserved. * @@ -10,42 +7,36 @@ * 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; - logr->profile = NULL; /*cmoraes*/ - - modules|= CCLIENT; - - if(ReadConfig(modules, cfgfile, logr, NULL) < 0) - { - return(OS_INVALID); + agt->port = DEFAULT_SECURE; + agt->rip = NULL; + agt->lip = NULL; + agt->rip_id = 0; + agt->execdq = 0; + agt->profile = NULL; + + modules |= CCLIENT; + + if (ReadConfig(modules, cfgfile, agt, NULL) < 0) { + return (OS_INVALID); } - return(1); + return (1); } - -/* EOF */