AUDIT_GET_REPLY(3)
π AUDIT_GET_REPLY(3) π
okay bestie, gather round, because we're talking about audit_get_reply β yes that's the whole name, she's the Linux Audit API's little messenger girl and she's serving π
β¨ NAME β¨
audit_get_reply β get the audit system's reply π«Ά
πΈ SYNOPSIS πΈ
#include <libaudit.h>
int audit_get_reply(int fd, struct audit_reply *rep, reply_t block, int peek);"
(and yes, that quote mark at the end is just sitting there being iconic, we don't question her π )
π¦ DESCRIPTION π¦
so like. this function grabs the next data packet that comes flying in on the audit netlink socket. it's the move you pull right after you've sent a command off to the audit system β you send, she replies, you catch it. main character energy fr fr β¨
let's break down the girlies:
fdβ gotta be an open file descriptor, the kind you got back fromaudit_open. no random fd's allowed, she's picky πrepβ a data structure where the reply gets tucked in all cozy πblockβ typereply_t, and it's lowkey a vibe check between two options:GET_REPLY_BLOCKINGandGET_REPLY_NONBLOCKING. pick your fighter π₯peekβ if this is non-zero, you get the data without dequeueing it from the netlink socket. like looking at your notifications without opening them. obsessed π
ngl bestie, peek is the sneaky one β same data, but it stays in the socket's queue, no cap.
β RETURN VALUE β
here's the tea, and it's three whole moods:
-errnoβ it went wrong π that's a negative errno, so pay attention to the sign0β an error response was received π (yes, zero is not "all good" here, don't get played)- positive value β slay, success, we ate π₯
π SEE ALSO π
audit_open(3) β the bestie that hands you the fd in the first place π«Ά
π AUTHOR π
Steve Grubb π
and that's the whole page, bestie!! this one's from Red Hat, dated Oct 2006 β an absolute vintage icon, we stan a classic πβ¨ππ¦πΈπ π«Άπβπ
π¦ 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: libaudit-dev 1:4.1.2-1build1 Β· GPL-2.0-only
- ubuntu resolute: libaudit-dev 1:4.1.2-1ubuntu0.1 Β· GPL-2.0-only
- ubuntu stonking: libaudit-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