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