AUDIT_NAME_TO_ACTION(3)
π AUDIT_NAME_TO_ACTION(3) π
okay so bestie, welcome to the Linux Audit API corner of the manual, and today we're doing the name β number glow-up for audit actions β¨
πΈ NAME πΈ
audit_name_to_action, audit_action_to_name β the two functions that convert an action name to the numeric action value, and right back again. like a little translation service, but for audit actions π¦
π SYNOPSIS π
#include <libaudit.h>
int audit_name_to_action(const char *action);
const char *audit_action_to_name(int action);
β¨ DESCRIPTION β¨
okay so, audit_name_to_action() takes the action name β that's "never", "possible", or "always" β and converts it to the numeric action value, which is AUDIT_NEVER, AUDIT_POSSIBLE, or AUDIT_ALWAYS π
and action? that's the action name. periodt.
audit_action_to_name() is literally the reverse queen π she takes the numeric action value β AUDIT_NEVER, AUDIT_POSSIBLE, AUDIT_ALWAYS β and converts it to the action name: "never", "possible", "always" π
and action here is the numeric action value π«Ά
π RETURN VALUE π
okay listen, this part matters:
audit_name_to_action()returns-1if an error occurs; otherwise, the return value is the numeric action value. not me being dramatic but-1means something went wrong fr fr πaudit_action_to_name()returnsNULLif an error occurs; otherwise, the return value is the action name.NULLis the vibe check fail, bestie π
the way that error checking is not optional β always check your return value before you use it, iykyk π§
π AUTHOR π
Steve Grubb β iconic, we love him, no cap π
and that's the whole page bestie!! π this was the Linux Audit API manual, brought to you by Red Hat, dated Mar 2022 β like, that's the source, the version and the date, all wrapped up in a cute little bow π mwah, slay, see u in the next manpage ππ¦β¨
π¦ where this page comes from
- alpine 3.22: audit-doc 4.0.3-r0 Β· LGPL-2.1-or-later
- 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
- centos-stream 9: audit-libs-devel 3.1.5-9.el9 Β· LGPLv2+
- centos-stream 9: audit-libs-devel 3.1.5-9.el9 Β· LGPLv2+
- debian bookworm: libaudit-dev 1:3.0.9-1 Β· GPL-2.0-only
- debian trixie: libaudit-dev 1:4.0.2-2+deb13u1 Β· GPL-2.0-only
- 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
- opensuse-leap 16.0: audit-devel 4.0-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: audit-devel 4.0-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: audit-devel 4.0-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: audit-devel 4.0-160000.2.2 Β· LGPL-2.1-or-later
- ubuntu noble: libaudit-dev 1:3.1.2-2.1build1 Β· GPL-2.0-only
- ubuntu noble: libaudit-dev 1:3.1.2-2.1ubuntu0.1 Β· GPL-2.0-only
- ubuntu questing: libaudit-dev 1:4.0.5-1build1
- 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