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