AUDIT_SET_ENABLED(3)
π AUDIT_SET_ENABLED π
okay bestie, so this is a page from the Linux Audit API (section 3 of the manual, iykyk) and it's all about the one little function that flips the whole audit system on and off. no cap. π
β¨ NAME β¨
audit_set_enabled β the function that turns auditing on or off, like a light switch but for your kernel's whole surveillance era π«Ά
πΈ SYNOPSIS πΈ
#include <libaudit.h>
int audit_set_enabled(int fd, uint32_t enabled);
π¦ DESCRIPTION π¦
so audit_set_enabled is literally the vibe check for the entire audit system β it controls whether the audit system is active or not, periodt.
when the audit system is enabled (enabled set to 1), it's giving full main character energy: every single syscall will pass through the audit system so it can collect information and potentially trigger an event. every one. no syscall gets to sneak past. π
when the audit system is disabled (enabled set to 0), syscalls do not enter the audit system and no data is collected. it's quiet. it's peaceful. it's a digital nap. π΄
π but wait β plot twist β there may still be some events generated by MAC subsystems like SE Linux even though the audit system is disabled. not me being off and them still showing up uninvited π
the good news? it is possible to suppress those events too, by adding an audit rule with flags set to AUDIT_FILTER_EXCLUDE. slay. problem solved. π
β RETURN VALUE β
the return value is <= 0 on error β so zero or anything negative means something went wrong, bestie π
otherwise, it's the netlink sequence id number. and heads up: this function can have any error that sendto would encounter, so don't come for the error list, it's the same energy as sendto. π₯
π SEE ALSO π
go read those too, they're part of the lore π
π AUTHOR π
Steve Grubb β the icon, the legend, the moment β¨
and that's the whole page, bestie!! this one came out of the Linux Audit API corner of the world, courtesy of Red Hat, dated October 2006 β yes, 2006, we love a vintage baddie π β and it lives in section 3 of the manual as AUDIT_SET_ENABLED. stan a classic. bye pookie, go enable your auditing responsibly ππ¦πΈ
π¦ 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