| 1 | /* |
| 2 | * AIDE (Advanced Intrusion Detection Environment) |
| 3 | * |
| 4 | * Copyright (C) 1999-2002, 2006, 2010-2011, 2016, 2019-2025 Rami Lehti, |
| 5 | * Pablo Virolainen, Richard van den Berg, Hannes von Haugwitz |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as |
| 9 | * published by the Free Software Foundation; either version 2 of the |
| 10 | * License, or (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License along |
| 18 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | */ |
| 21 | |
| 22 | #ifndef _GEN_LIST_H_INCLUDED |
| 23 | #define _GEN_LIST_H_INCLUDED |
| 24 | #include <stdbool.h> |
| 25 | #include "attributes.h" |
| 26 | #include "rx_rule.h" |
| 27 | #include "db_config.h" |
| 28 | #include "file.h" |
| 29 | #include "seltree.h" |
| 30 | #include "db_disk.h" |
| 31 | |
| 32 | struct stat; |
| 33 | |
| 34 | /* DB_FOO are anded together to form rx_rule's attr */ |
| 35 | |
| 36 | /* |
| 37 | * populate_tree() |
| 38 | * Populate tree with data from disk and db |
| 39 | * Also do comparing while adding to the tree |
| 40 | */ |
| 41 | void populate_tree(seltree*); |
| 42 | |
| 43 | void write_tree(seltree*); |
| 44 | |
| 45 | match_t check_rxtree(file_t, seltree*, char *, bool, const char *); |
| 46 | match_result check_limit(char*, bool, const char *); |
| 47 | |
| 48 | struct db_line* get_file_attrs(disk_entry *, DB_ATTR_TYPE, DB_ATTR_TYPE, const char *); |
| 49 | void add_file_to_tree(seltree*, db_line*, int, const database *, disk_entry *, const char*); |
| 50 | |
| 51 | void print_match(file_t, match_t); |
| 52 | #endif /*_GEN_LIST_H_INCLUDED*/ |