X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;ds=sidebyside;f=src%2Flogcollector%2Fconfig.c;h=8e1aee3acb9b56f3213a4e12728a31c77efaaa89;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hp=67ed25373cb7615f527a88ba64e14bc0536e667f;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a;p=ossec-hids.git diff --git a/src/logcollector/config.c b/src/logcollector/config.c index 67ed253..8e1aee3 100755 --- a/src/logcollector/config.c +++ b/src/logcollector/config.c @@ -1,20 +1,21 @@ -/* @(#) $Id: config.c,v 1.20 2009/06/24 18:52:13 dcid Exp $ */ +/* @(#) $Id: ./src/logcollector/config.c, 2011/10/07 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 */ -/* v0.3 (2005/08/23): Using the new OS_XML syntax and changing some usage +/* v0.3 (2005/08/23): Using the new OS_XML syntax and changing some usage * v0.2 (2005/01/17) */ - -#include "shared.h" + +#include "shared.h" #include "logcollector.h" @@ -23,7 +24,7 @@ * Read the config file (the localfiles) * v0.3: Changed for the new OS_XML */ -int LogCollectorConfig(char * cfgfile) +int LogCollectorConfig(char * cfgfile, int accept_remote) { int modules = 0; @@ -32,16 +33,20 @@ int LogCollectorConfig(char * cfgfile) modules|= CLOCALFILE; log_config.config = NULL; + log_config.agent_cfg = 0; + log_config.accept_remote = accept_remote; if(ReadConfig(modules, cfgfile, &log_config, NULL) < 0) return(OS_INVALID); - + #ifdef CLIENT modules|= CAGENT_CONFIG; + log_config.agent_cfg = 1; ReadConfig(modules, AGENTCONFIG, &log_config, NULL); + log_config.agent_cfg = 0; #endif - logff = log_config.config; + logff = log_config.config; return(1);