AUSEARCH_ADD...ERPRETED_ITEM(3)
π AUSEARCH_ADD_INTERPRETED_ITEM(3) π
okay bestie, gather round, because we're doing Linux Audit API today and it's actually so good. this is ausearch_add_interpreted_item from <auparse.h>, and she's a whole mood: she builds up a search rule, one little condition at a time. π
β¨ NAME β¨
ausearch_add_interpreted_item β build up search rule
π¦ SYNOPSIS π¦
#include <auparse.h>
int ausearch_add_interpreted_item(auparse_state_t *au, const char *field,
const char *op, const char *value,
ausearch_rule_t how);
πΈ DESCRIPTION πΈ
so basically, ausearch_add_interpreted_item adds one search condition to the current audit search expression. then you can take those search conditions and use them to scan logs, files, or buffers for something of interest. it's giving detective energy, fr fr. π
fieldβ the field name that thevalueis gonna be checked for. that's the whole assignment, bestie.opβ describes what kind of check is being done.
the legal op values are, and yes we're listing all of them:
existsβ just check that a field name exists. that's it, that's the whole job. lowkey the simplest one. β¨=β locate the field name and check that the value associated with it is equal to the value given in this rule.!=β locate the field name and check that the value associated with it is NOT equal to the value given in this rule. the hater of the group, iconic. π
the value parameter gets compared to the interpreted field value β aka the value that would be returned by auparse_interpret_field(3). no cap, that's the important bit.
π«Ά the how value π«Ά
the how value determines how this search condition is gonna 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. starting fresh, main character 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 these three are the moment. pick wisely which one you want, because CLEAR will absolutely wipe what you had. π
β RETURN VALUE β
returns -1 if an error occurs; otherwise, 0 for success. classic. that's the whole vibe check.
π SEE ALSO π
ausearch_add_expression(3)ausearch_add_item(3)ausearch_add_timestamp_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 π
Steve Grubb. we stan. π
okay that's the whole page, you ate that. this absolute classic was brought to you by Red Hat, dated Nov 2007, and it lives in section 3 of the Linux Audit API manual, filed under AUSEARCH_ADD...ERPRETED_ITEM(3). go forth and search, bestie. π§β¨
π¦ where this page comes from
- alpine 3.23: audit-doc 4.1.2-r2 Β· LGPL-2.1-or-later
- alpine 3.24: audit-doc 4.1.2-r6 Β· LGPL-2.1-or-later
- 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.1.1-2.fc43 Β· LGPL-2.0-or-later
- fedora 43: audit-libs-devel 4.1.1-2.fc43 Β· 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.1.4-1.fc44 Β· LGPL-2.0-or-later
- fedora 44: audit-libs-devel 4.1.4-1.fc44 Β· 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
- ubuntu resolute: libauparse-dev 1:4.1.2-1build1 Β· GPL-2.0-only
- ubuntu resolute: libauparse-dev 1:4.1.2-1ubuntu0.1 Β· GPL-2.0-only
- ubuntu stonking: libauparse-dev 1:4.1.2-1ubuntu1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms