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