projects
/
ossec-hids.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 2.7
[ossec-hids.git]
/
src
/
logcollector
/
config.c
diff --git
a/src/logcollector/config.c
b/src/logcollector/config.c
index
33d64ab
..
8e1aee3
100755
(executable)
--- a/
src/logcollector/config.c
+++ b/
src/logcollector/config.c
@@
-1,4
+1,5
@@
-/* @(#) $Id$ */
+/* @(#) $Id: ./src/logcollector/config.c, 2011/10/07 dcid Exp $
+ */
/* Copyright (C) 2009 Trend Micro Inc.
* All right reserved.
/* Copyright (C) 2009 Trend Micro Inc.
* All right reserved.
@@
-9,12
+10,12
@@
* Foundation
*/
* 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)
*/
* v0.2 (2005/01/17)
*/
-
-#include "shared.h"
+
+#include "shared.h"
#include "logcollector.h"
#include "logcollector.h"
@@
-23,7
+24,7
@@
* Read the config file (the localfiles)
* v0.3: Changed for the new OS_XML
*/
* 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;
{
int modules = 0;
@@
-32,16
+33,20
@@
int LogCollectorConfig(char * cfgfile)
modules|= CLOCALFILE;
log_config.config = NULL;
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);
if(ReadConfig(modules, cfgfile, &log_config, NULL) < 0)
return(OS_INVALID);
-
+
#ifdef CLIENT
modules|= CAGENT_CONFIG;
#ifdef CLIENT
modules|= CAGENT_CONFIG;
+ log_config.agent_cfg = 1;
ReadConfig(modules, AGENTCONFIG, &log_config, NULL);
ReadConfig(modules, AGENTCONFIG, &log_config, NULL);
+ log_config.agent_cfg = 0;
#endif
#endif
- logff = log_config.config;
+ logff = log_config.config;
return(1);
return(1);