AUPARSE_FIND_FIELD(3)

πŸ“¦
version 4.2.1 Β· 3 versions
, in alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, fedora 43, fedora 44, nixpkgs unstable, ubuntu resolute, ubuntu stonking

✨ AUPARSE_FIND_FIELD(3) ✨

okay bestie so this one lives in the Linux Audit API section of the manual (section 3, the library-calls girlies πŸ’…), and it's literally the search bar of your audit event. let's get into it 🫢


🌸 NAME 🌸

auparse_find_field β€” search for field name


πŸŽ€ SYNOPSIS πŸŽ€

#include <auparse.h>

const char * auparse_find_field(auparse_state_t *au,constchar*"name);"

(no i did not typo that, that's literally what the synopsis says, i am but a humble messenger πŸ™ˆ)


πŸ’– DESCRIPTION πŸ’–

so auparse_find_field goes on a lil scavenger hunt πŸ” β€” it scans all the records in an event to find the first occurrence of the field name you hand it.

the search starts from wherever the cursor is currently sitting, so it's not a "start from the top every time" situation, it's a "from here, onward" situation. main character energy honestly.

and the field name you pass in? it gets stored for subsequent searching. so it remembers what you were looking for. it's thoughtful like that πŸ’œ

NOTE: auparse creates 2 pseudo fields that do not exist in the natural record for SELinux AVC and USER_AVC decision and permissions. their names are seresult and seperms respectively. so if you're like "where did this field come from??" β€” it's a pseudo field, it's fine, breathe 🧚

πŸ‘‘ RETURN VALUE πŸ‘‘

  • returns NULL if the field was not found 😭
  • if an error occurs, errno will be set
  • otherwise? it returns a pointer to the text value associated with the field. slay ✨

🌈 SEE ALSO 🌈

go read those too, they're the rest of the friend group πŸ¦‹


πŸ’œ AUTHOR πŸ’œ

Steve Grubb πŸ‘‘


and that's the whole vibe check πŸŽ€ this page is brought to you by Red Hat, dated June 2021. stan the audit API, periodt πŸ’…βœ¨