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