AUPARSE_GET_NODE(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_GET_NODE πŸ’–

ok so bestie, welcome to AUPARSE_GET_NODE(3) β€” yes that's the man page name, that's the section number (3, we're in library land), and it lives under the Linux Audit API umbrella. she's a little function, she's a specific girl, and she does exactly one thing. let's get into it 🫢


✨ NAME ✨

auparse_get_node β€” grab the event's machine node name 🏷️


🌸 SYNOPSIS 🌸

#include <auparse.h>

const char * auparse_get_node(const auparse_state_t *au);
ok yes there's a stray " at the end of that signature in the original and I am not touching it, that's canon, that's the lore πŸ’€

πŸ¦‹ DESCRIPTION πŸ¦‹

so like. auparse_get_node gets the machine's node name β€” but only if it exists in the audit event, and it pulls it straight out of the current event's timestamp data structure. ✨

here's the tea tho: not all records have node names, because it's an admin-configurable option. so if your admin didn't set it, it's just not there. no node name, no vibes, nothing. don't come for the function, it's literally not her fault πŸ™ˆ


πŸ‘‘ RETURN VALUE πŸ‘‘

she returns a copy of the node name πŸ’… β€” or NULL if it doesn't exist, or if there was an error.

⚠️ bestie listen CLOSELY: the caller must free the string. that's on you. that copy is yours now, you own it, you clean it up. no leaks in this group chat πŸš«πŸ’§

πŸ”₯ SEE ALSO πŸ”₯

the whole timestamp bestie squad fr fr πŸŽ€


🌈 AUTHOR 🌈

Steve Grubb β€” the icon, the moment, the main character 🫢


and that's the whole page!! brought to you by Red Hat, dated Sept 2007 β€” yes she's been iconic since 2007, longevity queen ⭐ mwah, go free your strings πŸ’œ