AUDIT_SET_FAILURE(3)
π AUDIT_SET_FAILURE(3) π
okay so bestie, this is a page from the Linux Audit API β the AUDIT_SET_FAILURE(3) one β and honestly? it's short, it's sweet, and it's lowkey about what your kernel does when the audit party gets too full. let's get into it π
β¨ NAME β¨
audit_set_failure β set the audit failure flag. that's it, that's the name, no notes π
πΈ SYNOPSIS πΈ
#include <libaudit.h>
int audit_set_failure(intfd,uint32_t"failure);"
yes the signature is giving cursed, we don't talk about it, just vibe with it π«Ά
π¦ DESCRIPTION π¦
so like, audit_set_failure sets the action that the kernel will perform when the backlog limit is reached β or when it hits an error and literally cannot proceed. it's the "what do we do now bestie" switch. π₯
the possible values are:
0-AUDIT_FAIL_SILENTβ do nothing, report nothing, skip logging the record, and just continue. silence. iconic ghost behaviour π1-AUDIT_FAIL_PRINTKβ [default] β log the audit record usingprintk, which will cause subsequent events to get written to syslog. the responsible one, the main character π2-AUDIT_FAIL_PANICβ call the panic function. this would be used to prevent use of the machine upon loss of audit events. yeah. it panics. on purpose. not me being dramatic, that's literally the spec π
okay fr fr, if you pick 2 you are choosing violence on purpose β it's there so the machine stops being usable if audit events get lost. not a casual setting, bestie, that's a whole commitment. π¨
π RETURN VALUE π
the return value is <= 0 on error, otherwise it's the netlink sequence id number. and ngl, this function can have any error that sendto would encounter β so if sendto can be weird about it, so can this. π
β SEE ALSO β
iykyk, go read those next π§
π AUTHOR π
Steve Grubb β thank you king π«Ά
and that's the whole page bestie!! this one came from Red Hat, dated June 2015, so it's a certified classic from the Linux Audit API era. slay, stay audited, and don't set it to panic unless you mean it πβ¨π
π¦ 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