source: trunk/include/sh_files.h@ 369

Last change on this file since 369 was 367, checked in by katerina, 13 years ago

Modifications for ticket #265 (inotify support). Needs testing.

File size: 6.2 KB
Line 
1/* SAMHAIN file system integrity testing */
2/* Copyright (C) 1999, 2000 Rainer Wichmann */
3/* */
4/* This program is free software; you can redistribute it */
5/* and/or modify */
6/* it under the terms of the GNU General Public License as */
7/* published by */
8/* the Free Software Foundation; either version 2 of the License, or */
9/* (at your option) any later version. */
10/* */
11/* This program is distributed in the hope that it will be useful, */
12/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
13/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
14/* GNU General Public License for more details. */
15/* */
16/* You should have received a copy of the GNU General Public License */
17/* along with this program; if not, write to the Free Software */
18/* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20#ifndef SH_FILES_H
21#define SH_FILES_H
22
23void sh_audit_mark (char * file);
24void sh_audit_delete_all ();
25char * sh_audit_fetch (char * file, time_t time, char * result, size_t rsize);
26
27struct sh_dirent {
28 char * sh_d_name;
29 struct sh_dirent * next;
30};
31
32
33/* free a directory listing
34 */
35void kill_sh_dirlist (struct sh_dirent * dirlist);
36
37#ifdef NEED_ADD_DIRENT
38/* add an entry to a directory listing
39 */
40struct sh_dirent * addto_sh_dirlist (struct dirent * thisEntry,
41 struct sh_dirent * dirlist);
42#endif
43
44/* register exceptions to hardlink check
45 */
46int sh_files_hle_reg (const char * str);
47
48/* Check for new files matching configured glob patterns.
49 */
50void sh_files_check_globPatterns();
51
52/* check the setup
53 */
54int sh_files_test_setup (void);
55
56/* check if allignore
57 */
58int sh_files_is_allignore (char * str);
59
60/* activate hardlink check
61 */
62int sh_files_check_hardlinks (const char * opt);
63
64/* check rsrc fork (Mac OS X)
65 */
66int sh_files_use_rsrc(const char * str);
67
68/* set recursion depth
69 */
70int sh_files_setrec (void);
71
72/* report only once
73 */
74int sh_files_reportonce(const char * c);
75
76/* report full details
77 */
78int sh_files_fulldetail(const char * c);
79
80/* reset the 'checked' flag
81 */
82void sh_dirs_reset(void);
83
84/* reset the 'checked' flag
85 */
86void sh_files_reset(void);
87
88/* set maximum recursion level
89 */
90int sh_files_setrecursion (const char * flag_s);
91
92/* select a directory stack 2=Two, else One (standard)
93 */
94int set_dirList (int which);
95
96/* push a directory on the stack USER0
97 */
98int sh_files_pushdir_user0 (const char * dirName);
99
100/* push a directory on the stack USER1
101 */
102int sh_files_pushdir_user1 (const char * dirName);
103
104/* push a directory on the stack USER2
105 */
106int sh_files_pushdir_user2 (const char * dirName);
107
108/* push a directory on the stack USER3
109 */
110int sh_files_pushdir_user3 (const char * dirName);
111
112/* push a directory on the stack USER4
113 */
114int sh_files_pushdir_user4 (const char * dirName);
115
116/* push a directory on the stack PRELINK
117 */
118int sh_files_pushdir_prelink (const char * dirName);
119
120/* push a directory on the stack ATTR
121 */
122int sh_files_pushdir_attr (const char * dirName);
123
124/* push a directory on the stack READONLY
125 */
126int sh_files_pushdir_ro (const char * dirName);
127
128/* push a directory on the stack LOGFILE
129 */
130int sh_files_pushdir_log (const char * dirName);
131
132/* push a directory on the stack GROWING LOGFILE
133 */
134int sh_files_pushdir_glog (const char * dirName);
135
136/* push a directory on the stack IGNORE NONE
137 */
138int sh_files_pushdir_noig (const char * dirName);
139
140/* push a directory on the stack IGNORE ALL
141 */
142int sh_files_pushdir_allig (const char * dirName);
143
144
145/* push a file on the stack USER0
146 */
147int sh_files_pushfile_user0 (const char * dirName);
148
149/* push a file on the stack USER1
150 */
151int sh_files_pushfile_user1 (const char * dirName);
152
153/* push a file on the stack USER2
154 */
155int sh_files_pushfile_user2 (const char * dirName);
156
157/* push a file on the stack USER3
158 */
159int sh_files_pushfile_user3 (const char * dirName);
160
161/* push a file on the stack USER4
162 */
163int sh_files_pushfile_user4 (const char * dirName);
164
165/* push a file on the stack PRELINK
166 */
167int sh_files_pushfile_prelink (const char * dirName);
168
169/* push a file on the stack ATTR
170 */
171int sh_files_pushfile_attr (const char * dirName);
172
173/* push a file on the stack READONLY
174 */
175int sh_files_pushfile_ro (const char * dirName);
176
177/* push a file on the stack LOGFILE
178 */
179int sh_files_pushfile_log (const char * dirName);
180
181/* push a file on the stack GROWING LOGFILE
182 */
183int sh_files_pushfile_glog (const char * dirName);
184
185/* push a file on the stack IGNORE NONE
186 */
187int sh_files_pushfile_noig (const char * dirName);
188
189/* push a file on the stack IGNORE ALL
190 */
191int sh_files_pushfile_allig (const char * dirName);
192
193
194/* check directories on the stack
195 */
196unsigned long sh_dirs_chk (int which);
197
198/* check files on the stack
199 */
200unsigned long sh_files_chk (void);
201
202int sh_files_delglobstack (void);
203
204int sh_files_deldirstack (void);
205
206int sh_files_delfilestack (void);
207
208/* redefine policies
209 */
210int sh_files_redef_user0(const char * str);
211int sh_files_redef_user1(const char * str);
212int sh_files_redef_user2(const char * str);
213int sh_files_redef_user3(const char * str);
214int sh_files_redef_user4(const char * str);
215int sh_files_redef_prelink(const char * str);
216int sh_files_redef_readonly(const char * str);
217int sh_files_redef_loggrow(const char * str);
218int sh_files_redef_logfiles(const char * str);
219int sh_files_redef_attributes(const char * str);
220int sh_files_redef_noignore(const char * str);
221int sh_files_redef_allignore(const char * str);
222
223ShFileType sh_files_filecheck (int class, unsigned long check_mask,
224 char * dirName,
225 char * infileName,
226 int * reported,
227 int rsrcflag);
228
229int sh_files_search_file(char * name, int * class, unsigned long *check_mask, int * reported);
230void sh_files_set_file_reported(char * name);
231void sh_files_clear_file_reported(char * name);
232
233#endif
234
235
236
237
Note: See TracBrowser for help on using the repository browser.