[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 | */
|
---|
| 25 | int sh_files_hle_reg (char * str);
|
---|
| 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 | */
|
---|
| 37 | int sh_files_check_hardlinks (char * opt);
|
---|
| 38 |
|
---|
| 39 | /* set recursion depth
|
---|
| 40 | */
|
---|
| 41 | int sh_files_setrec (void);
|
---|
| 42 |
|
---|
| 43 | /* report only once
|
---|
| 44 | */
|
---|
| 45 | int sh_files_reportonce(char * c);
|
---|
| 46 |
|
---|
| 47 | /* report full details
|
---|
| 48 | */
|
---|
| 49 | int sh_files_fulldetail(char * c);
|
---|
| 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 | */
|
---|
| 61 | int sh_files_setrecursion (char * flag_s);
|
---|
| 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 | */
|
---|
| 69 | int sh_files_pushdir_user0 (char * dirName);
|
---|
| 70 |
|
---|
| 71 | /* push a directory on the stack USER1
|
---|
| 72 | */
|
---|
| 73 | int sh_files_pushdir_user1 (char * dirName);
|
---|
| 74 |
|
---|
| 75 | /* push a directory on the stack PRELINK
|
---|
| 76 | */
|
---|
| 77 | int sh_files_pushdir_prelink (char * dirName);
|
---|
| 78 |
|
---|
| 79 | /* push a directory on the stack ATTR
|
---|
| 80 | */
|
---|
| 81 | int sh_files_pushdir_attr (char * dirName);
|
---|
| 82 |
|
---|
| 83 | /* push a directory on the stack READONLY
|
---|
| 84 | */
|
---|
| 85 | int sh_files_pushdir_ro (char * dirName);
|
---|
| 86 |
|
---|
| 87 | /* push a directory on the stack LOGFILE
|
---|
| 88 | */
|
---|
| 89 | int sh_files_pushdir_log (char * dirName);
|
---|
| 90 |
|
---|
| 91 | /* push a directory on the stack GROWING LOGFILE
|
---|
| 92 | */
|
---|
| 93 | int sh_files_pushdir_glog (char * dirName);
|
---|
| 94 |
|
---|
| 95 | /* push a directory on the stack IGNORE NONE
|
---|
| 96 | */
|
---|
| 97 | int sh_files_pushdir_noig (char * dirName);
|
---|
| 98 |
|
---|
| 99 | /* push a directory on the stack IGNORE ALL
|
---|
| 100 | */
|
---|
| 101 | int sh_files_pushdir_allig (char * dirName);
|
---|
| 102 |
|
---|
| 103 |
|
---|
| 104 | /* push a file on the stack USER0
|
---|
| 105 | */
|
---|
| 106 | int sh_files_pushfile_user0 (char * dirName);
|
---|
| 107 |
|
---|
| 108 | /* push a file on the stack USER1
|
---|
| 109 | */
|
---|
| 110 | int sh_files_pushfile_user1 (char * dirName);
|
---|
| 111 |
|
---|
| 112 | /* push a file on the stack PRELINK
|
---|
| 113 | */
|
---|
| 114 | int sh_files_pushfile_prelink (char * dirName);
|
---|
| 115 |
|
---|
| 116 | /* push a file on the stack ATTR
|
---|
| 117 | */
|
---|
| 118 | int sh_files_pushfile_attr (char * dirName);
|
---|
| 119 |
|
---|
| 120 | /* push a file on the stack READONLY
|
---|
| 121 | */
|
---|
| 122 | int sh_files_pushfile_ro (char * dirName);
|
---|
| 123 |
|
---|
| 124 | /* push a file on the stack LOGFILE
|
---|
| 125 | */
|
---|
| 126 | int sh_files_pushfile_log (char * dirName);
|
---|
| 127 |
|
---|
| 128 | /* push a file on the stack GROWING LOGFILE
|
---|
| 129 | */
|
---|
| 130 | int sh_files_pushfile_glog (char * dirName);
|
---|
| 131 |
|
---|
| 132 | /* push a file on the stack IGNORE NONE
|
---|
| 133 | */
|
---|
| 134 | int sh_files_pushfile_noig (char * dirName);
|
---|
| 135 |
|
---|
| 136 | /* push a file on the stack IGNORE ALL
|
---|
| 137 | */
|
---|
| 138 | int sh_files_pushfile_allig (char * dirName);
|
---|
| 139 |
|
---|
| 140 |
|
---|
| 141 | /* check directories on the stack
|
---|
| 142 | */
|
---|
| 143 | unsigned long sh_dirs_chk (int which);
|
---|
| 144 |
|
---|
| 145 | /* check files on the stack
|
---|
| 146 | */
|
---|
| 147 | unsigned long sh_files_chk (void);
|
---|
| 148 |
|
---|
| 149 | int sh_files_deldirstack (void);
|
---|
| 150 |
|
---|
| 151 | int sh_files_delfilestack (void);
|
---|
| 152 |
|
---|
| 153 | /* redefine policies
|
---|
| 154 | */
|
---|
| 155 | int sh_files_redef_user0(char * str);
|
---|
| 156 | int sh_files_redef_user1(char * str);
|
---|
| 157 | int sh_files_redef_prelink(char * str);
|
---|
| 158 | int sh_files_redef_readonly(char * str);
|
---|
| 159 | int sh_files_redef_loggrow(char * str);
|
---|
| 160 | int sh_files_redef_logfiles(char * str);
|
---|
| 161 | int sh_files_redef_attributes(char * str);
|
---|
| 162 | int sh_files_redef_noignore(char * str);
|
---|
| 163 | int sh_files_redef_allignore(char * str);
|
---|
| 164 |
|
---|
| 165 |
|
---|
| 166 | #endif
|
---|
| 167 |
|
---|
| 168 |
|
---|
| 169 |
|
---|
| 170 |
|
---|