AUSEARCH_ADD...TAMP_ITEM_EX(3)
β¨ AUSEARCH_ADD_TIMESTAMP_ITEM_EX β¨
okay bestie, so this one lives in the Linux Audit API section of the manual (section 3, the library-functions girlies π ), and it's literally the function that builds up a search rule. buckle up, it's short but it slaps π
πΈ NAME πΈ
ausearch_add_timestamp_item_ex β build up search rule π«Ά
π SYNOPSIS π
#include <auparse.h>
int ausearch_add_timestamp_item_ex(auparse_state_t *au,
const char *op,
time_t sec,
unsigned milli,
unsigned serial,
ausearch_rule_t how);
π DESCRIPTION π
ausearch_add_timestamp_item adds an event time condition to the current audit search expression. periodt. once you've got your search conditions stacked up, you can use them to scan logs, files, or buffers for something of interest β¨
so the op parameter is the vibe-check of the comparison β it specifies the desired comparison. legal op values are <, <=, >=, > and = β that's it, those are the only ones, no cap.
the left operand of the comparison operator is the timestamp of the examined event π and the right operand is specified by the sec, milli, and serial parameters. so like, event timestamp on the left, your custom timestamp on the right, and op is the little guy in the middle deciding who wins π§
now the how value determines how this search condition will affect the existing search expression if one is already defined. the possible values are:
AUSEARCH_RULE_CLEARβ clear the current search expression, if any, and use only this search condition. it's giving clean slate energy π§Ήβ¨AUSEARCH_RULE_ORβ if a search expressionEis already configured, replace it by(E || this_search_condition).AUSEARCH_RULE_ANDβ if a search expressionEis already configured, replace it by(E && this_search_condition).
ngl those||and&&are doing the absolute most in this economy and we love them for it π₯
π RETURN VALUE π
Returns -1 if an error occurs; otherwise, 0 for success.
so likeβ¦ 0 = slay, -1 = not slay π that's the whole vibe check.
π APPLICATION USAGE π
use ausearch_add_item(3) and ausearch_add_interpreted_item(3) to add conditions that check audit record fields. use ausearch_add_expression(3) to add complex search expressions using a single function call. iykyk π«Ά
π¦ SEE ALSO π¦
ausearch_add_expression(3)ausearch_add_item(3)ausearch_add_interpreted_item(3)ausearch_add_regex(3)ausearch_set_stop(3)ausearch_clear(3)ausearch_next_event(3)ausearch_cur_event(3)ausearch-expression(5)
π AUTHOR π
Miloslav Trmac β icon, legend, the moment π
and that's the whole page bestie, no crumbs left πΈ this one came from Red Hat, dated Aug 2014, and the manual name is AUSEARCH_ADD...TAMP_ITEM_EX(3) β she's giving abbreviated-section-title realness and honestly? she ate. mwah π
β¨
π¦ where this page comes from
- arch rolling: audit 4.2.1-1 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- centos-stream 10: audit-libs-devel 4.2.1-3.el10 Β· LGPL-2.0-or-later
- fedora 43: audit-libs-devel 4.2.1-1.fc43 Β· LGPL-2.0-or-later
- fedora 43: audit-libs-devel 4.2.1-1.fc43 Β· LGPL-2.0-or-later
- fedora 44: audit-libs-devel 4.2.1-1.fc44 Β· LGPL-2.0-or-later
- fedora 44: audit-libs-devel 4.2.1-1.fc44 Β· LGPL-2.0-or-later
- nixpkgs unstable: audit 4.2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms