AUDIT_UPDATE_WATCH_PERMS(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_UPDATE_WATCH_PERMS πŸ’…

okay bestie, gather round, because today we're talking about audit_update_watch_perms from the Linux Audit API β€” it's the little function that updates the permissions field of a watch command. lowkey iconic, highkey essential. ✨


✨ SYNOPSIS ✨

#include <libaudit.h>

int audit_update_watch_perms(struct audit_rule_data *rule,int"perms);"

(yes, that last line is exactly how it shows up in the original β€” we do not touch the lore, we only report it 🫢)


🌸 DESCRIPTION 🌸

So here's the tea: audit_update_watch_perms adds the permission checks to a watch command that is being built. That's it, that's the whole job, and it does it flawlessly. πŸ’…

The perms you hand it? They're a bitwise or'ing of these four besties right here:

  • AUDIT_PERM_EXEC
  • AUDIT_PERM_WRITE
  • AUDIT_PERM_READ
  • AUDIT_PERM_ATTR

Stack 'em with | and let it cook. πŸ”₯


πŸŽ€ RETURN VALUE πŸŽ€

  • Returns a number < 0 if an error occurs 😭
  • otherwise, 0 for success πŸ‘‘

periodt.


πŸ¦‹ SEE ALSO πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

Steve Grubb. a real one, no cap. 🫢


Red Hat Β· Feb 2007 Β· AUDIT_UPDATE_WATCH_PERMS(3)

and that's the whole page bestie, mwah πŸ’– slay, go update those watch perms responsibly 🌈⭐