AUDIT_DETECT_MACHINE(3)

πŸ“¦
version 4.2.1 Β· 2 versions
, in alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, fedora 43, fedora 44, nixpkgs unstable, ubuntu resolute, ubuntu stonking

πŸ’– AUDIT_DETECT_MACHINE(3) πŸ’–

okay bestie, welcome to the Linux Audit API corner of the man pages ✨ this one's a lil baby function but she's important, trust 🫢


🌸 NAME 🌸

audit_detect_machine β€” the girl who figures out what machine you're on πŸ’…


✨ SYNOPSIS ✨

#include <libaudit.h>

int audit_detect_machine(void);

like literally that's it, no args, no drama, she just knows 🧚


πŸ¦‹ DESCRIPTION πŸ¦‹

so audit_detect_machine goes and queries uname, then takes that kernel machine string and converts it into an enum value that's defined in machine_t 🌈

and why do we care?? because the machine type is needed for any use of the audit_name_to_syscall function. like, you cannot use that one without knowing this one first. they're a package deal, iykyk 😌


πŸ’œ RETURN VALUE πŸ’œ

  • if something goes wrong β†’ she returns -1 😭
  • otherwise β†’ the return value is the machine's type πŸ‘‘

no in-between, no maybes, periodt.


πŸŽ€ SEE ALSO πŸŽ€


πŸ‘‘ AUTHOR πŸ‘‘

Steve Grubb β€” the icon who wrote this πŸ’–


Red Hat Β· Oct 2006 β€” yeah bestie this page is old enough to have its own vibe, and it still ate πŸ’…βœ¨ bye luv u 🫢