AUDIT_CAN_CONTROL(3)
π AUDIT_CAN_CONTROL π
ok so bestie, welcome to the Linux Audit API section 3 era of your life πΈ this is the page for audit_can_control, audit_can_write, and audit_can_read β the lil trio that tells you whether your process can do audit stuff. vibe check for capabilities, basically β¨
π NAME π
audit_can_control, audit_can_write, audit_can_read β test audit related capabilities π΅οΈβοΈ
β¨ SYNOPSIS β¨
#include <libaudit.h>
int audit_can_control(void);
int audit_can_write(void);
int audit_can_read(void);
like, three functions, no arguments, all vibes π¦
π DESCRIPTION π
okay so here's the tea, bestie β
audit_can_control()returns1if the calling process possesses theCAP_AUDIT_CONTROLcapability, otherwise0. she's asking "can I control the audit system??" πaudit_can_write()returns1ifCAP_AUDIT_WRITEis available. can you write to the audit log, or nah πaudit_can_read()returns1ifCAP_AUDIT_READis present. reading the audit log is main character energy fr πβ¨
π«Ά important caveat bestie: when libcap-ng support is not available these functions return1only when the effective UID is0. so no libcap-ng = it's just doing a lil root check, periodt. no cap.
β RETURN VALUE β
These functions return 1 when the capability is present and 0 otherwise. that's it. that's the whole range. iconic simplicity tbh π
π SEE ALSO π
go read that one next, iykyk π§
π AUTHOR π
Steve Grubb π
and that's a wrap on the July 2025 edition from Red Hat πΈ thanks for reading bestie, now go check ur capabilities πβ¨π
π¦ 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