Last change
on this file since 479 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
|
Line | |
---|
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"
|
---|
9 | #include "sh_pthread.h"
|
---|
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"
|
---|
16 | #include "sh_processcheck.h"
|
---|
17 | #include "sh_portcheck.h"
|
---|
18 | #include "sh_logmon.h"
|
---|
19 | #include "sh_registry.h"
|
---|
20 | #include "sh_fInotify.h"
|
---|
21 |
|
---|
22 | sh_mtype modList[] = {
|
---|
23 | #ifdef SH_USE_UTMP
|
---|
24 | {
|
---|
25 | N_("UTMP"),
|
---|
26 | -1,
|
---|
27 | SH_MODFL_NOTIMER,
|
---|
28 | sh_utmp_init,
|
---|
29 | sh_utmp_timer,
|
---|
30 | sh_utmp_check,
|
---|
31 | sh_utmp_end,
|
---|
32 | sh_utmp_reconf,
|
---|
33 |
|
---|
34 | N_("[Utmp]"),
|
---|
35 | sh_utmp_table,
|
---|
36 | PTHREAD_MUTEX_INITIALIZER,
|
---|
37 | },
|
---|
38 | #endif
|
---|
39 |
|
---|
40 | #ifdef SH_USE_MOUNTS
|
---|
41 | {
|
---|
42 | N_("MOUNTS"),
|
---|
43 | -1,
|
---|
44 | 0,
|
---|
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,
|
---|
53 | PTHREAD_MUTEX_INITIALIZER,
|
---|
54 | },
|
---|
55 | #endif
|
---|
56 |
|
---|
57 | #ifdef SH_USE_USERFILES
|
---|
58 | {
|
---|
59 | N_("USERFILES"),
|
---|
60 | -1,
|
---|
61 | 0,
|
---|
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,
|
---|
70 | PTHREAD_MUTEX_INITIALIZER,
|
---|
71 | },
|
---|
72 | #endif
|
---|
73 |
|
---|
74 | #ifdef SH_USE_KERN
|
---|
75 | {
|
---|
76 | N_("KERNEL"),
|
---|
77 | -1,
|
---|
78 | 0,
|
---|
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,
|
---|
87 | PTHREAD_MUTEX_INITIALIZER,
|
---|
88 | },
|
---|
89 | #endif
|
---|
90 |
|
---|
91 | #ifdef SH_USE_SUIDCHK
|
---|
92 | {
|
---|
93 | N_("SUIDCHECK"),
|
---|
94 | -1,
|
---|
95 | 0,
|
---|
96 | sh_suidchk_init,
|
---|
97 | sh_suidchk_timer,
|
---|
98 | sh_suidchk_check,
|
---|
99 | sh_suidchk_end,
|
---|
100 | sh_suidchk_reconf,
|
---|
101 |
|
---|
102 | N_("[SuidCheck]"),
|
---|
103 | sh_suidchk_table,
|
---|
104 | PTHREAD_MUTEX_INITIALIZER,
|
---|
105 | },
|
---|
106 | #endif
|
---|
107 |
|
---|
108 | #ifdef SH_USE_PROCESSCHECK
|
---|
109 | {
|
---|
110 | N_("PROCESSCHECK"),
|
---|
111 | -1,
|
---|
112 | 0,
|
---|
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,
|
---|
121 | PTHREAD_MUTEX_INITIALIZER,
|
---|
122 | },
|
---|
123 | #endif
|
---|
124 |
|
---|
125 | #ifdef SH_USE_PORTCHECK
|
---|
126 | {
|
---|
127 | N_("PORTCHECK"),
|
---|
128 | -1,
|
---|
129 | 0,
|
---|
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,
|
---|
138 | PTHREAD_MUTEX_INITIALIZER,
|
---|
139 | },
|
---|
140 | #endif
|
---|
141 |
|
---|
142 | #ifdef USE_LOGFILE_MONITOR
|
---|
143 | {
|
---|
144 | N_("LOGMON"),
|
---|
145 | -1,
|
---|
146 | 0,
|
---|
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 |
|
---|
153 | N_("[Logmon]"),
|
---|
154 | sh_log_check_table,
|
---|
155 | PTHREAD_MUTEX_INITIALIZER,
|
---|
156 | },
|
---|
157 | #endif
|
---|
158 |
|
---|
159 | #ifdef USE_REGISTRY_CHECK
|
---|
160 | {
|
---|
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 |
|
---|
176 | #if defined(HAVE_SYS_INOTIFY_H)
|
---|
177 | {
|
---|
178 | N_("INOTIFY"),
|
---|
179 | -1,
|
---|
180 | 0,
|
---|
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 | {
|
---|
194 | NULL,
|
---|
195 | -1,
|
---|
196 | 0,
|
---|
197 |
|
---|
198 | NULL,
|
---|
199 | NULL,
|
---|
200 | NULL,
|
---|
201 | NULL,
|
---|
202 | NULL,
|
---|
203 |
|
---|
204 | NULL,
|
---|
205 | NULL,
|
---|
206 | PTHREAD_MUTEX_INITIALIZER,
|
---|
207 | },
|
---|
208 | };
|
---|
209 |
|
---|
210 | #endif
|
---|
211 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.