Debian Codegraph @

include/db_line.h

raw symbols SCIP
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_INCLUDED
25
26 #include <stdbool.h>
27 #include <stdio.h>
28 #include <sys/types.h>
29 #include "config.h"
30 #include "attributes.h"
31 #ifdef HAVE_FSTYPE
32 #include "file.h"
33 #endif
34 #include "hashsum.h"
35 #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_line {
61 byte* hashsums[num_hashes];
62
63 #ifdef WITH_POSIX_ACL
64 acl_type* acl;
65 #endif
66
67 mode_t perm;
68 mode_t perm_o; /* Permission for tree traverse */
69 #ifdef HAVE_FSTYPE
70 FS_TYPE fs_type;
71 #endif
72 long uid; /* uid_t */
73 long gid; /* gid_t */
74 time_t atime;
75 time_t ctime;
76 time_t mtime;
77 long inode; /* ino_t */
78 long nlink; /* nlink_t */
79
80 long long size; /* off_t */
81 long long bcount; /* blkcnt_t */
82 char* filename;
83 char* fullpath;
84 char* linkname;
85
86 char *cntx;
87
88 #ifdef WITH_XATTR
89 xattrs_type* xattrs;
90 #endif
91
92 unsigned long e2fsattrs;
93
94 char* capabilities;
95
96 /* Attributes .... */
97 DB_ATTR_TYPE attr;
98
99 } db_line;
100
101 #endif