AUDITCTL(2)

πŸ“¦
version 1.1 Β· 2 versions
, in nixos 26.05, nixpkgs unstable

πŸ’… AUDITCTL(2) β€” like, the system calls manual, bestie

okay so this is auditctl(2) out of the System Calls Manual, and ngl it's a short one but it's got lore πŸ‘‘


✨ NAME ✨

auditctl β€” configure system audit parameters πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <bsm/audit.h>

int
auditctl(const char *path);

🌸 DESCRIPTION 🌸

so the auditctl() system call literally just tells the kernel "hey bestie, open a new audit trail log file for me" πŸ’– and it's giving gatekept because it requires an appropriate privilege β€” so no, you can't just rock up without clearance, the vibe check is strict πŸ™ˆ

one thing to be super clear on: auditctl() opens new files, but auditon(2) is what you use to disable the audit log. so don't come for auditctl() for that, it's not its job, it's not its era, periodt πŸ’…


πŸŽ€ RETURN VALUES πŸŽ€

  • 0 β€” slay, it worked, successful completion ✨
  • -1 β€” not slay 😭, and the global variable errno gets set to indicate the error so you know exactly what went wrong

πŸ”₯ ERRORS πŸ”₯

the auditctl() system call will fail if:

  • [EINVAL] β€” The path is invalid. it's giving "that's not a path, that's a cry for help" πŸ’€
  • [EPERM] β€” The process does not have sufficient permission to complete the operation. no privilege, no service, sorry babe 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, iykyk πŸ“š


🌈 HISTORY 🌈

the OpenBSM implementation was created by McAfee Research (the security division of McAfee Inc., not to be confused with anything else) under contract to Apple Computer Inc. in 2004 πŸ“ and it was subsequently adopted by the TrustedBSD Project as the foundation for the OpenBSM distribution. iconic lineage fr fr ⭐


🧚 AUTHORS 🧚

This software was created by McAfee Research, the security research division of McAfee, Inc., under contract to Apple Computer Inc. πŸ’œ

Additional authors include Wayne Salamon, Robert Watson, and SPARTA Inc. 🫢

The Basic Security Module (BSM) interface to audit records and audit event stream format were defined by Sun Microsystems β˜€οΈ

This manual page was written by Robert Watson <rwatson@FreeBSD.org> ✍️


no cap, that's the whole page β€” short, sweet, and fully privileged πŸ’…

mwah πŸ’– this one shipped from Debian, dated April 19, 2005 β€” yeah she's a vintage icon, we stan a classic πŸŽ€βœ¨

πŸ“¦ where this page comes from