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