diff options
author | netblue30 <netblue30@protonmail.com> | 2021-07-28 08:30:24 -0400 |
---|---|---|
committer | netblue30 <netblue30@protonmail.com> | 2021-07-28 08:30:24 -0400 |
commit | a627071b33b42dd24a90070236d2f85eeebc423c (patch) | |
tree | 5388f450044f8b205812e5f6e740874d40b4dd62 /src/fids/fids.h | |
parent | Merge pull request #4410 from kmk3/revert-allow-deny-etc (diff) | |
download | firejail-a627071b33b42dd24a90070236d2f85eeebc423c.tar.gz firejail-a627071b33b42dd24a90070236d2f85eeebc423c.tar.zst firejail-a627071b33b42dd24a90070236d2f85eeebc423c.zip |
intrusion detection system
Diffstat (limited to 'src/fids/fids.h')
-rw-r--r-- | src/fids/fids.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/fids/fids.h b/src/fids/fids.h new file mode 100644 index 000000000..a2e2886fe --- /dev/null +++ b/src/fids/fids.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2014-2021 Firejail Authors | ||
3 | * | ||
4 | * This file is part of firejail project | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as 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 along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | #ifndef FIDS_H | ||
21 | #define FIDS_H | ||
22 | |||
23 | #include "../include/common.h" | ||
24 | |||
25 | // main.c | ||
26 | #define MAX_DIR_LEVEL 20 // max directory tree depth | ||
27 | #define MAX_INCLUDE_LEVEL 10 // max include level for config files | ||
28 | extern int f_scanned; | ||
29 | extern int f_modified; | ||
30 | extern int f_new; | ||
31 | extern int f_removed; | ||
32 | extern int f_permissions; | ||
33 | |||
34 | // db.c | ||
35 | #define HASH_MAX 2048 // power of 2 | ||
36 | int db_init(void); | ||
37 | void db_check(const char *fname, const char *checksum, const char *mode); | ||
38 | void db_missing(void); | ||
39 | |||
40 | // db_exclude.c | ||
41 | void db_exclude_add(const char *fname); | ||
42 | int db_exclude_check(const char *fname); | ||
43 | |||
44 | |||
45 | // blake2b.c | ||
46 | //#define KEY_SIZE 128 // key size in bytes | ||
47 | #define KEY_SIZE 256 | ||
48 | //#define KEY_SIZE 512 | ||
49 | int blake2b(void *out, size_t outlen, const void *in, size_t inlen); | ||
50 | |||
51 | #endif \ No newline at end of file | ||