| 1 | /* |
| 2 | * AIDE (Advanced Intrusion Detection Environment) |
| 3 | * |
| 4 | * Copyright (C) 1999-2002, 2004-2006, 2010, 2013, 2019-2022, 2024, 2025 |
| 5 | * Rami Lehti, Pablo Virolainen, Richard van den Berg, |
| 6 | * Hannes von Haugwitz |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License as |
| 10 | * published by the Free Software Foundation; either version 2 of the |
| 11 | * License, or (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, but |
| 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 | * General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License along |
| 19 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 21 | */ |
| 22 | |
| 23 | #ifndef _DB_LINE_H_INCLUDED |
| 24 | #define _DB_LINE_H_INCLUDEDcxx . . $ `include/db_line.h:24:9`! |
| 25 | |
| 26 | #include <stdbool.h> |
| 27 | #include <stdio.h> |
| 28 | #include <sys/types.h> |
| 29 | #include "config.h"cxx . . $ `<file>/include/config.h`/ |
| 30 | #include "attributes.h"cxx . . $ `<file>/include/attributes.h`/ |
| 31 | #ifdef HAVE_FSTYPEcxx . . $ `./include/config.h:53:9`! |
| 32 | #include "file.h"cxx . . $ `<file>/include/file.h`/ |
| 33 | #endif |
| 34 | #include "hashsum.h"cxx . . $ `<file>/include/hashsum.h`/ |
| 35 | #include "util.h"cxx . . $ `<file>/include/util.h`/ |
| 36 | |
| 37 | #ifdef WITH_POSIX_ACL |
| 38 | typedef struct acl_type { |
| 39 | char *acl_a; /* ACCESS */ |
| 40 | char *acl_d; /* DEFAULT, directories only */ |
| 41 | } acl_type; |
| 42 | #endif |
| 43 | |
| 44 | #ifdef WITH_XATTR |
| 45 | typedef struct xattr_node |
| 46 | { |
| 47 | char *key; |
| 48 | byte *val; |
| 49 | size_t vsz; |
| 50 | } xattr_node; |
| 51 | |
| 52 | typedef struct xattrs_type |
| 53 | { |
| 54 | size_t num; |
| 55 | size_t sz; |
| 56 | struct xattr_node *ents; |
| 57 | } xattrs_type; |
| 58 | #endif |
| 59 | |
| 60 | typedef struct db_linecxx . . $ db_line# { |
| 61 | bytecxx . . $ byte#* hashsumscxx . . $ db_line#hashsums.[num_hashescxx . . $ num_hashes.]; |
| 62 | |
| 63 | #ifdef WITH_POSIX_ACL |
| 64 | acl_type* acl; |
| 65 | #endif |
| 66 | |
| 67 | mode_tcxx . . $ mode_t# permcxx . . $ db_line#perm.; |
| 68 | mode_tcxx . . $ mode_t# perm_ocxx . . $ db_line#perm_o.; /* Permission for tree traverse */ |
| 69 | #ifdef HAVE_FSTYPEcxx . . $ `./include/config.h:53:9`! |
| 70 | FS_TYPEcxx . . $ `include/file.h:49:9`! fs_typecxx . . $ db_line#fs_type.; |
| 71 | #endif |
| 72 | long uidcxx . . $ db_line#uid.; /* uid_t */ |
| 73 | long gidcxx . . $ db_line#gid.; /* gid_t */ |
| 74 | time_tcxx . . $ time_t# atimecxx . . $ db_line#atime.; |
| 75 | time_tcxx . . $ time_t# ctimecxx . . $ db_line#ctime.; |
| 76 | time_tcxx . . $ time_t# mtimecxx . . $ db_line#mtime.; |
| 77 | long inodecxx . . $ db_line#inode.; /* ino_t */ |
| 78 | long nlinkcxx . . $ db_line#nlink.; /* nlink_t */ |
| 79 | |
| 80 | long long sizecxx . . $ db_line#size.; /* off_t */ |
| 81 | long long bcountcxx . . $ db_line#bcount.; /* blkcnt_t */ |
| 82 | char* filenamecxx . . $ db_line#filename.; |
| 83 | char* fullpathcxx . . $ db_line#fullpath.; |
| 84 | char* linknamecxx . . $ db_line#linkname.; |
| 85 | |
| 86 | char *cntxcxx . . $ db_line#cntx.; |
| 87 | |
| 88 | #ifdef WITH_XATTR |
| 89 | xattrs_type* xattrs; |
| 90 | #endif |
| 91 | |
| 92 | unsigned long e2fsattrscxx . . $ db_line#e2fsattrs.; |
| 93 | |
| 94 | char* capabilitiescxx . . $ db_line#capabilities.; |
| 95 | |
| 96 | /* Attributes .... */ |
| 97 | DB_ATTR_TYPEcxx . . $ `include/attributes.h:25:9`! attrcxx . . $ db_line#attr.; |
| 98 | |
| 99 | } db_linecxx . . $ db_line#; |
| 100 | |
| 101 | #endif |