AUDIT_LOG_USER_MESSAGE(3)
β¨ AUDIT_LOG_USER_MESSAGE(3) β¨
the Linux Audit API but make it cute π β this is audit_log_user_message, bestie, and she is that girl.
π NAME π
audit_log_user_message β log a general user message π
πΈ SYNOPSIS πΈ
#include <libaudit.h>
int audit_log_user_message(int audit_fd, int type, const char *message, const char *hostname, const char *addr, const char *tty, int result)
π¦ DESCRIPTION π¦
okay so. This function logs a message to the audit system using a predefined message format. Periodt.
Who's it for? All ELF console apps that do not manipulate accounts or groups. That's the vibe check. π
But bestie, listen β if your app is written in Python or some other interpreter? Then you do NOT use this one. Use the audit_log_user_comm_message function instead. No cap, it's a whole different function for a whole different situation.
The function parameters are as follows, and I need you to know every single one π :
audit_fdβ the fd returned byaudit_opentypeβ type of message, ex:AUDIT_USYS_CONFIG,AUDIT_USER_LOGINmessageβ the message text being senthostnameβ the hostname if known,NULLif unknownaddrβ the network address of the user,NULLif unknownttyβ the tty of the user, ifNULLwill attempt to figure outresultβ1is "success" and0is "failed"
π RETURN VALUE π
She returns the sequence number, which is > 0 on success or <= 0 on error. slay β¨
π ERRORS π
This function returns -1 on failure. Examine errno for more info. (yes, you have to actually look at it, i'm sorry π)
π SEE ALSO π
audit_log_user_comm_message(3)audit_log_acct_message(3)audit_log_user_avc_message(3)audit_log_semanage_message(3)
π«Ά AUTHOR π«Ά
Steve Grubb β the icon, the moment, the legend π
and that's the whole page, bestie π§ this one came from Red Hat, dated July 2016, and honestly it ate. go forth and log 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