source: trunk/src/sh_modules.c@ 394

Last change on this file since 394 was 372, checked in by katerina, 13 years ago

One more patch for ticket #265 (inotify). Handle dirs that are only specified as files.

File size: 3.1 KB
RevLine 
[1]1#include "config_xor.h"
2
3#include <stdio.h>
4#include <time.h>
5
6#if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE)
7
8#include "sh_modules.h"
[140]9#include "sh_pthread.h"
[1]10
11#include "sh_utmp.h"
12#include "sh_mounts.h"
13#include "sh_userfiles.h"
14#include "sh_kern.h"
15#include "sh_suidchk.h"
[68]16#include "sh_processcheck.h"
17#include "sh_portcheck.h"
[183]18#include "sh_logmon.h"
[294]19#include "sh_registry.h"
[367]20#include "sh_fInotify.h"
[1]21
22sh_mtype modList[] = {
23#ifdef SH_USE_UTMP
24 {
25 N_("UTMP"),
[142]26 -1,
[259]27 SH_MODFL_NOTIMER,
[1]28 sh_utmp_init,
29 sh_utmp_timer,
30 sh_utmp_check,
31 sh_utmp_end,
[149]32 sh_utmp_reconf,
[1]33
34 N_("[Utmp]"),
35 sh_utmp_table,
[140]36 PTHREAD_MUTEX_INITIALIZER,
[1]37 },
38#endif
39
40#ifdef SH_USE_MOUNTS
41 {
42 N_("MOUNTS"),
[142]43 -1,
[259]44 0,
[1]45 sh_mounts_init,
46 sh_mounts_timer,
47 sh_mounts_check,
48 sh_mounts_cleanup,
49 sh_mounts_reconf,
50
51 N_("[Mounts]"),
52 sh_mounts_table,
[140]53 PTHREAD_MUTEX_INITIALIZER,
[1]54 },
55#endif
56
57#ifdef SH_USE_USERFILES
58 {
59 N_("USERFILES"),
[142]60 -1,
[259]61 0,
[1]62 sh_userfiles_init,
63 sh_userfiles_timer,
64 sh_userfiles_check,
65 sh_userfiles_cleanup,
66 sh_userfiles_reconf,
67
68 N_("[UserFiles]"),
69 sh_userfiles_table,
[140]70 PTHREAD_MUTEX_INITIALIZER,
[1]71 },
72#endif
73
74#ifdef SH_USE_KERN
75 {
76 N_("KERNEL"),
[142]77 -1,
[259]78 0,
[1]79 sh_kern_init,
80 sh_kern_timer,
81 sh_kern_check,
82 sh_kern_end,
83 sh_kern_null,
84
85 N_("[Kernel]"),
86 sh_kern_table,
[140]87 PTHREAD_MUTEX_INITIALIZER,
[1]88 },
89#endif
[68]90
[1]91#ifdef SH_USE_SUIDCHK
92 {
93 N_("SUIDCHECK"),
[142]94 -1,
[259]95 0,
[1]96 sh_suidchk_init,
97 sh_suidchk_timer,
98 sh_suidchk_check,
99 sh_suidchk_end,
[149]100 sh_suidchk_reconf,
[1]101
102 N_("[SuidCheck]"),
103 sh_suidchk_table,
[140]104 PTHREAD_MUTEX_INITIALIZER,
[1]105 },
106#endif
[68]107
108#ifdef SH_USE_PROCESSCHECK
[1]109 {
[68]110 N_("PROCESSCHECK"),
[142]111 -1,
[259]112 0,
[68]113 sh_prochk_init,
114 sh_prochk_timer,
115 sh_prochk_check,
116 sh_prochk_cleanup,
117 sh_prochk_reconf,
118
119 N_("[ProcessCheck]"),
120 sh_prochk_table,
[140]121 PTHREAD_MUTEX_INITIALIZER,
[68]122 },
123#endif
124
125#ifdef SH_USE_PORTCHECK
126 {
127 N_("PORTCHECK"),
[142]128 -1,
[259]129 0,
[68]130 sh_portchk_init,
131 sh_portchk_timer,
132 sh_portchk_check,
133 sh_portchk_cleanup,
134 sh_portchk_reconf,
135
136 N_("[PortCheck]"),
137 sh_portchk_table,
[140]138 PTHREAD_MUTEX_INITIALIZER,
[68]139 },
140#endif
141
[183]142#ifdef USE_LOGFILE_MONITOR
[68]143 {
[183]144 N_("LOGMON"),
145 -1,
[259]146 0,
[183]147 sh_log_check_init,
148 sh_log_check_timer,
149 sh_log_check_check,
150 sh_log_check_cleanup,
151 sh_log_check_reconf,
152
[186]153 N_("[Logmon]"),
[183]154 sh_log_check_table,
155 PTHREAD_MUTEX_INITIALIZER,
156 },
157#endif
158
[294]159#ifdef USE_REGISTRY_CHECK
[183]160 {
[294]161 N_("REGISTRY"),
162 -1,
163 0,
164 sh_reg_check_init,
165 sh_reg_check_timer,
166 sh_reg_check_run,
167 sh_reg_check_cleanup,
168 sh_reg_check_reconf,
169
170 N_("[Registry]"),
171 sh_reg_check_table,
172 PTHREAD_MUTEX_INITIALIZER,
173 },
174#endif
175
[367]176#if defined(HAVE_SYS_INOTIFY_H)
[294]177 {
[367]178 N_("INOTIFY"),
179 -1,
[372]180 0,
[367]181 sh_fInotify_init,
182 sh_fInotify_timer,
183 sh_fInotify_run,
184 sh_fInotify_cleanup,
185 sh_fInotify_reconf,
186
187 N_("[Inotify]"),
188 sh_fInotify_table,
189 PTHREAD_MUTEX_INITIALIZER,
190 },
191#endif
192
193 {
[1]194 NULL,
[142]195 -1,
[259]196 0,
[1]197
198 NULL,
199 NULL,
200 NULL,
201 NULL,
202 NULL,
203
204 NULL,
205 NULL,
[140]206 PTHREAD_MUTEX_INITIALIZER,
[1]207 },
208};
209
210#endif
211
Note: See TracBrowser for help on using the repository browser.