Imported Upstream version 2.5.1
[ossec-hids.git] / src / client-agent / config.c
1 /* @(#) $Id$ */
2
3 /* Copyright (C) 2009 Trend Micro Inc.
4  * All right reserved.
5  *
6  * This program is a free software; you can redistribute it
7  * and/or modify it under the terms of the GNU General Public
8  * License (version 2) as published by the FSF - Free Software
9  * Foundation
10  */
11
12
13
14 #include "shared.h"
15
16 #include "os_xml/os_xml.h"
17 #include "os_regex/os_regex.h"
18 #include "os_net/os_net.h"
19
20 #include "agentd.h"
21
22
23 /* Relocated from config_op.c */
24
25 /* ClientConf v0.2, 2005/03/03
26  * Read the config file (for the remote client)
27  * v0.2: New OS_XML
28  */ 
29 int ClientConf(char *cfgfile)
30 {
31     int modules = 0;
32     logr->port = DEFAULT_SECURE;
33     logr->rip = NULL;
34     logr->lip = NULL;
35     logr->rip_id = 0;
36     logr->execdq = 0;
37
38     modules|= CCLIENT;
39
40     if(ReadConfig(modules, cfgfile, logr, NULL) < 0)
41     {
42         return(OS_INVALID);
43     }
44
45     return(1);
46 }
47
48
49 /* EOF */