Imported Upstream version 2.7
[ossec-hids.git] / src / remoted / config.c
1 /* @(#) $Id: ./src/remoted/config.c, 2011/09/08 dcid Exp $
2  */
3
4 /* Copyright (C) 2009 Trend Micro Inc.
5  * All rights 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 #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 "remoted.h"
21 #include "config/config.h"
22
23
24 /* RemotedConfig v0.4, 2006/04/10
25  * Read the config file (the remote access)
26  * v0.2: New OS_XML
27  * v0.3: Some improvements and cleanup
28  * v0.4: Move everything to the global config validator.
29  */
30 int RemotedConfig(char *cfgfile, remoted *logr)
31 {
32     int modules = 0;
33
34     modules|= CREMOTE;
35
36     logr->port = NULL;
37     logr->conn = NULL;
38     logr->allowips = NULL;
39     logr->denyips = NULL;
40
41     if(ReadConfig(modules, cfgfile, logr, NULL) < 0)
42         return(OS_INVALID);
43
44     return(1);
45 }
46
47
48 /* EOF */