AUPARSE_INTERPRET_FIELD(3)
π auparse_interpret_field(3) π
okay bestie, sit down, hydrate, because we're about to talk about the <auparse.h> girlies that translate your raw audit fields into stuff a human can actually read. This is the auparse_interpret_field(3) family and honestly? iconic. π
β¨ NAME β¨
auparse_interpret_field, auparse_interpret_realpath, auparse_interpret_sock_family, auparse_interpret_sock_port, auparse_interpret_sock_address β get the current field's interpreted value π
πΈ SYNOPSIS πΈ
#include <auparse.h>
const char *auparse_interpret_field(const auparse_state_t *au);
const char *auparse_interpret_realpath(const auparse_state_t *au);
const char *auparse_interpret_sock_family(auparse_state_t *au);
const char *auparse_interpret_sock_port(auparse_state_t *au);
const char *auparse_interpret_sock_address(const auparse_state_t *au);
π¦ DESCRIPTION π¦
So, auparse_interpret_field gives you the interpreted value of the field you're currently sitting on β that's the current field of the current record of the current event, no cap. The string it hands back is escaped using whichever escape method you picked. π«Ά
β οΈ and this part MATTERS: the returned string gets destroyed if you call this function again. it's giving "one (1) use only". if you need to interpret another field and keep this value, you have to copy it for later. do not skip this step, bestie, I am begging. π
Things that might get interpreted include: uid, gid, syscall numbers, exit codes, file paths, socket addresses, permissions, modes, and capabilities. And there are likely to be more in the future β the glow-up never ends β¨. If a value can't be interpreted, you just get its original value back. no drama.
auparse_interpret_realpath is literally auparse_interpret_field but it also calls realpath on the result of gluing the cwd and file together. Which also means it's only valid to call for the file name given in a PATH record. read that twice. π
auparse_interpret_sock_family returns only the socket family portion of a socket address. just the family. that's the whole job. π
auparse_interpret_sock_port returns only the port portion of a socket address. but lowkey not all socket families even have a port β if yours doesn't, you get a NULL value, and in that case your best option is to use the normal interpretation function. π
auparse_interpret_sock_address returns only the address portion of a socket address. same situation: not all socket families have an ip address, and if yours doesn't, you get a NULL value, and your best option is (you guessed it) the normal interpretation function. π
π RETURN VALUE π
Returns NULL if there's an error. Otherwise, a pointer to the interpreted value. that's it, that's the deal. β
π₯ SEE ALSO π₯
π AUTHOR π
Steve Grubb
and that's the whole page, bestie β written under Red Hat, dated August 2017, and I love that for us. go forth and interpret your fields responsibly. mwah πβ¨
π¦ 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