source: trunk/include/sh_files.h@ 274

Last change on this file since 274 was 256, checked in by katerina, 15 years ago

Evaluated glob patterns at each check (ticket #173).

File size: 5.8 KB
RevLine 
[1]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
[131]23struct sh_dirent {
24 char * sh_d_name;
25 struct sh_dirent * next;
26};
27
28/* free a directory listing
29 */
30void kill_sh_dirlist (struct sh_dirent * dirlist);
31
[138]32#ifdef NEED_ADD_DIRENT
[131]33/* add an entry to a directory listing
34 */
35struct sh_dirent * addto_sh_dirlist (struct dirent * thisEntry,
36 struct sh_dirent * dirlist);
[138]37#endif
38
[1]39/* register exceptions to hardlink check
40 */
[22]41int sh_files_hle_reg (const char * str);
[1]42
[256]43/* Check for new files matching configured glob patterns.
44 */
45void sh_files_check_globPatterns();
46
[1]47/* check the setup
48 */
49int sh_files_test_setup (void);
50
51/* check if allignore
52 */
53int sh_files_is_allignore (char * str);
54
55/* activate hardlink check
56 */
[22]57int sh_files_check_hardlinks (const char * opt);
[1]58
[254]59/* check rsrc fork (Mac OS X)
60 */
61int sh_files_use_rsrc(const char * str);
62
[1]63/* set recursion depth
64 */
65int sh_files_setrec (void);
66
67/* report only once
68 */
[22]69int sh_files_reportonce(const char * c);
[1]70
71/* report full details
72 */
[22]73int sh_files_fulldetail(const char * c);
[1]74
75/* reset the 'checked' flag
76 */
77void sh_dirs_reset(void);
78
79/* reset the 'checked' flag
80 */
81void sh_files_reset(void);
82
83/* set maximum recursion level
84 */
[20]85int sh_files_setrecursion (const char * flag_s);
[1]86
87/* select a directory stack 2=Two, else One (standard)
88 */
89int set_dirList (int which);
90
91/* push a directory on the stack USER0
92 */
[22]93int sh_files_pushdir_user0 (const char * dirName);
[1]94
95/* push a directory on the stack USER1
96 */
[22]97int sh_files_pushdir_user1 (const char * dirName);
[1]98
[27]99/* push a directory on the stack USER2
100 */
101int sh_files_pushdir_user2 (const char * dirName);
102
103/* push a directory on the stack USER3
104 */
105int sh_files_pushdir_user3 (const char * dirName);
106
107/* push a directory on the stack USER4
108 */
109int sh_files_pushdir_user4 (const char * dirName);
110
[1]111/* push a directory on the stack PRELINK
112 */
[22]113int sh_files_pushdir_prelink (const char * dirName);
[1]114
115/* push a directory on the stack ATTR
116 */
[22]117int sh_files_pushdir_attr (const char * dirName);
[1]118
119/* push a directory on the stack READONLY
120 */
[22]121int sh_files_pushdir_ro (const char * dirName);
[1]122
123/* push a directory on the stack LOGFILE
124 */
[22]125int sh_files_pushdir_log (const char * dirName);
[1]126
127/* push a directory on the stack GROWING LOGFILE
128 */
[22]129int sh_files_pushdir_glog (const char * dirName);
[1]130
131/* push a directory on the stack IGNORE NONE
132 */
[22]133int sh_files_pushdir_noig (const char * dirName);
[1]134
135/* push a directory on the stack IGNORE ALL
136 */
[22]137int sh_files_pushdir_allig (const char * dirName);
[1]138
139
140/* push a file on the stack USER0
141 */
[22]142int sh_files_pushfile_user0 (const char * dirName);
[1]143
144/* push a file on the stack USER1
145 */
[22]146int sh_files_pushfile_user1 (const char * dirName);
[1]147
[27]148/* push a file on the stack USER2
149 */
150int sh_files_pushfile_user2 (const char * dirName);
151
152/* push a file on the stack USER3
153 */
154int sh_files_pushfile_user3 (const char * dirName);
155
156/* push a file on the stack USER4
157 */
158int sh_files_pushfile_user4 (const char * dirName);
159
[1]160/* push a file on the stack PRELINK
161 */
[22]162int sh_files_pushfile_prelink (const char * dirName);
[1]163
164/* push a file on the stack ATTR
165 */
[22]166int sh_files_pushfile_attr (const char * dirName);
[1]167
168/* push a file on the stack READONLY
169 */
[22]170int sh_files_pushfile_ro (const char * dirName);
[1]171
172/* push a file on the stack LOGFILE
173 */
[22]174int sh_files_pushfile_log (const char * dirName);
[1]175
176/* push a file on the stack GROWING LOGFILE
177 */
[22]178int sh_files_pushfile_glog (const char * dirName);
[1]179
180/* push a file on the stack IGNORE NONE
181 */
[22]182int sh_files_pushfile_noig (const char * dirName);
[1]183
184/* push a file on the stack IGNORE ALL
185 */
[22]186int sh_files_pushfile_allig (const char * dirName);
[1]187
188
189/* check directories on the stack
190 */
191unsigned long sh_dirs_chk (int which);
192
193/* check files on the stack
194 */
195unsigned long sh_files_chk (void);
196
[256]197int sh_files_delglobstack (void);
198
[1]199int sh_files_deldirstack (void);
200
201int sh_files_delfilestack (void);
202
203/* redefine policies
204 */
[22]205int sh_files_redef_user0(const char * str);
206int sh_files_redef_user1(const char * str);
[27]207int sh_files_redef_user2(const char * str);
208int sh_files_redef_user3(const char * str);
209int sh_files_redef_user4(const char * str);
[22]210int sh_files_redef_prelink(const char * str);
211int sh_files_redef_readonly(const char * str);
212int sh_files_redef_loggrow(const char * str);
213int sh_files_redef_logfiles(const char * str);
214int sh_files_redef_attributes(const char * str);
215int sh_files_redef_noignore(const char * str);
216int sh_files_redef_allignore(const char * str);
[1]217
218
219#endif
220
221
222
223
Note: See TracBrowser for help on using the repository browser.