Imported Upstream version 2.7
[ossec-hids.git] / src / rootcheck / config.c
1 /* @(#) $Id: ./src/rootcheck/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 #ifdef OSSECHIDS
14 #include "shared.h"
15 #include "rootcheck.h"
16 #include "config/config.h"
17
18
19
20 /* Read_Rootcheck_Config: Reads the rootcheck config
21  */
22 int Read_Rootcheck_Config(char * cfgfile)
23 {
24     int modules = 0;
25
26     modules|= CROOTCHECK;
27
28     if(ReadConfig(modules, cfgfile, &rootcheck, NULL) < 0)
29         return(OS_INVALID);
30
31
32     #ifdef CLIENT
33     /* Reading shared config */
34     modules|= CAGENT_CONFIG;
35     ReadConfig(modules, AGENTCONFIG, &rootcheck, NULL);
36     #endif
37
38     return(0);
39 }
40
41 /* EOF */
42 #endif