new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / remoted / config.c
1 /* Copyright (C) 2009 Trend Micro Inc.
2  * All rights reserved.
3  *
4  * This program is a free software; you can redistribute it
5  * and/or modify it under the terms of the GNU General Public
6  * License (version 2) as published by the FSF - Free Software
7  * Foundation
8  */
9
10 #include "shared.h"
11 #include "os_xml/os_xml.h"
12 #include "os_regex/os_regex.h"
13 #include "os_net/os_net.h"
14 #include "remoted.h"
15 #include "config/config.h"
16
17
18 /* Read the config file (the remote access) */
19 int RemotedConfig(const char *cfgfile, remoted *cfg)
20 {
21     int modules = 0;
22
23     modules |= CREMOTE;
24
25     cfg->port = NULL;
26     cfg->conn = NULL;
27     cfg->allowips = NULL;
28     cfg->denyips = NULL;
29
30     if (ReadConfig(modules, cfgfile, cfg, NULL) < 0) {
31         return (OS_INVALID);
32     }
33
34     return (1);
35 }
36