X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fclient-agent%2Fconfig.c;h=a16d279fe10f68638ae5c07630b3c101e3cc7fc9;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hp=312eb7025be2daac468e68ccfed23d17e823529f;hpb=301048b51990573e58a30dc4a5bb4ec285cad554;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 312eb70..a16d279 --- a/src/client-agent/config.c +++ b/src/client-agent/config.c @@ -1,5 +1,3 @@ -/* @(#) $Id$ */ - /* Copyright (C) 2009 Trend Micro Inc. * All right reserved. * @@ -9,41 +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; + 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 */