AUDIT_REQUEST_FEATURES(3)

πŸ’– AUDIT_REQUEST_FEATURES πŸ’–

okay bestie, so this is audit_request_features from the Linux Audit API β€” it lives in section 3 of the manual, which is the "library functions" section, iykyk. She's a libaudit girlie and she has one job and she does it flawlessly. ✨


🌸 NAME 🌸

audit_request_features β€” request audit feature bitmap πŸŽ€

Like, literally just ask the kernel "hey queen, what audit features do you support?" and get a bitmap back. That's the whole vibe.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <libaudit.h>

int audit_request_features(int fd);

Two lines, no drama, no notes. πŸ’…


πŸ‘‘ DESCRIPTION πŸ‘‘

So here's the tea, bestie πŸ“: audit_request_features() requests that the kernel send a structure describing supported audit features on fd.

And fd β€” listen β€” must be an open audit netlink socket. Not just any random file descriptor, not your cousin's socket, an audit netlink socket. No cap. If it isn't, that's on you. πŸ™ˆ


⭐ RETURN VALUE ⭐

  • The return value is <= 0 on error β€” so zero or negative means something went wrong, periodt. 😭
  • Otherwise, it's the netlink sequence id number. Iconic. ✨
  • And heads up: this function can have any error that sendto(2) would encounter. So if sendto(2) can throw it, this baby can catch it too. Main character energy, honestly.

🌈 SEE ALSO 🌈

Go read those next, bestie, they're all in the same friend group. 🫢


πŸ’œ AUTHOR πŸ’œ

Steve Grubb β€” the legend, the blueprint, the moment. πŸ‘‘


Red Hat, July 2025 β€” that's where this page comes from and when she was last updated. Slay, and good luck with your feature bitmap, bestie πŸ’–πŸŽ€πŸ¦‹βœ¨