AUDIT_IS_ENABLED(3)

✨ AUDIT_IS_ENABLED πŸ’…

okay bestie, welcome to the Linux Audit API corner of the manual β€” this one's called audit_is_enabled, and fr fr the name is doing 90% of the work here. it tells you whether auditing is turned on. that's it. that's the whole vibe. πŸ¦‹


🌸 NAME 🌸

audit_is_enabled β€” judge whether auditing is enabled or not πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <libaudit.h>

int audit_is_enabled(int fd);

πŸ’– DESCRIPTION πŸ’–

so audit_is_enabled() does exactly what it says on the tin, no cap: it judges whether auditing is enabled or not. that's the function. that's the assignment. she ate and left no crumbs. ✨

the one thing you gotta know: fd has to be a file descriptor that came back from audit_open(3). like, you can't just roll up with any random fd and expect her to read your mind. use the one from audit_open(3), periodt. πŸ™ˆ


⭐ RETURN VALUE ⭐

here's the tea, and it's a three-way split so pay attention bestie:

  • returns 0 if auditing is NOT enabled 😭
  • returns 1 if it IS enabled πŸŽ‰
  • returns -1 on error πŸ’€

🌈 SEE ALSO 🌈


πŸ’œ AUTHOR πŸ’œ

Steve Grubb β€” the icon, the moment, the legend. bow down. πŸ‘‘


and that's the whole page, bestie! this lil masterpiece is brought to you by Red Hat, dated May 2021 β€” old but iconic, like a fine wine or a really good playlist. mwah. πŸ’…πŸŽ€βœ¨

πŸ“¦ where this page comes from