Skip to content

Commit 19300d4

Browse files
committed
Add a reason for MIN_SPACE_LEFT
1 parent 9943799 commit 19300d4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/auditd-event.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ static volatile ATOMIC_INT flush;
101101
static auparse_state_t *au = NULL;
102102

103103
/* Local definitions */
104+
// The reason 24 was chosen is lost in time. Enriched events start life with
105+
// format_raw which reserves 32 bytes. After that a newline, space a separator
106+
// get added. That leaves roughly 28 bytes. It is suspected that 24 was chosen
107+
// to at least allow one syscall or a uid to fully fit. In practice
108+
// MIN_SPACE_LEFT should never be hit unless the system uses very long paths.
104109
#define MIN_SPACE_LEFT 24
105110

106111
static inline int from_network(const struct auditd_event *e)

0 commit comments

Comments
 (0)