Imported Upstream version 2.7
[ossec-hids.git] / src / config / syscheck-config.h
1 /* @(#) $Id: ./src/config/syscheck-config.h, 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 #ifndef __SYSCHECKC_H
15 #define __SYSCHECKC_H
16
17
18 #define MAX_DIR_SIZE    64
19 #define MAX_DIR_ENTRY   128
20 #define SYSCHECK_WAIT   300
21
22
23 /* Checking options */
24 #define CHECK_MD5SUM        0000001
25 #define CHECK_PERM          0000002
26 #define CHECK_SIZE          0000004
27 #define CHECK_OWNER         0000010
28 #define CHECK_GROUP         0000020
29 #define CHECK_SHA1SUM       0000040
30 #define CHECK_REALTIME      0000100
31 #define CHECK_SEECHANGES    0000200
32
33
34 #include <stdio.h>
35 typedef struct _rtfim
36 {
37     int fd;
38     void *dirtb;
39     #ifdef WIN32
40     HANDLE evt;
41     #endif
42 }rtfim;
43
44 typedef struct _config
45 {
46     int tsleep;            /* sleep for sometime for daemon to settle */
47     int sleep_after;
48     int rootcheck;         /* set to 0 when rootcheck is disabled */
49     int disabled;          /* is syscheck disabled? */
50     int scan_on_start;
51     int realtime_count;
52
53     int time;              /* frequency (secs) for syscheck to run */
54     int queue;             /* file descriptor of socket to write to queue */
55
56     int *opts;             /* attributes set in the <directories> tag element */
57
58     char *workdir;         /* set to the DEFAULTDIR (/var/ossec) */
59     char *remote_db;
60     char *db;
61
62     char *scan_day;        /* run syscheck on this day */
63     char *scan_time;       /* run syscheck at this time */
64
65     char **ignore;         /* list of files/dirs to ignore */
66     void **ignore_regex;   /* regex of files/dirs to ignore */
67
68     char **dir;            /* array of directories to be scanned */
69     void **filerestrict;
70
71     /* Windows only registry checking */
72     #ifdef WIN32
73     char **registry_ignore;         /* list of registry entries to ignore */
74     void **registry_ignore_regex;   /* regex of registry entries to ignore */
75     char **registry;                /* array of registry entries to be scanned */
76     FILE *reg_fp;
77     #endif
78
79     void *fp;
80
81     rtfim *realtime;
82
83     char *prefilter_cmd;
84
85 }config;
86
87 #endif
88
89 /* EOF */