AUDIT_NAME_TO_FLAG(3)
π AUDIT_NAME_TO_FLAG(3) π
okay bestie so we're deep in the Linux Audit API today and this one is literally a little translator function, no cap. it's audit_name_to_flag, and it's giving "name goes in, number comes out" energy. π¦
β¨ NAME β¨
audit_name_to_flag β converts the rule-matching filter name into the numeric rule-matching filter value. that's it, that's the whole job, and she does it flawlessly π
πΈ SYNOPSIS πΈ
#include <libaudit.h>
int audit_name_to_flag(const char *flag);
π DESCRIPTION π
so like, audit_name_to_flag() takes a rule-matching filter name and turns it into the matching numeric rule-matching filter value. glow-up but make it integers β¨
the names it recognizes, and their numeric besties, are:
"task"βAUDIT_FILTER_TASK"exit"βAUDIT_FILTER_EXIT"user"βAUDIT_FILTER_USER"exclude"βAUDIT_FILTER_EXCLUDE"filesystem"βAUDIT_FILTER_FS
and flag is, you guessed it, the rule-matching filter name you're passing in. π«Ά
π RETURN VALUE π
- if something goes wrong, she returns
-1π - otherwise? you get back the numeric rule-matching filter value. slay. β
π₯ SEE ALSO π₯
audit_flag_to_name(3),β the reverse girly, they're a matching set fr fr
π AUTHOR π
Steve Grubb β king behavior, we stan π
okay that's the whole page bestie, mwah π this lil icon came from Red Hat, Mar 2022, and honestly? timeless. periodt. π β¨π
π¦ 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