avc_has_perm_noaudit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ avc_has_perm_noaudit(9) ✨

okay so bestie, welcome to avc_has_perm_noaudit from the Kernel API Manual β€” yes it's a section 9 page, yes it's kernel-time, and yes it's lowkey iconic πŸŽ€

πŸ’– NAME πŸ’–

avc_has_perm_noaudit β€” check permissions but perform no auditing. like, she checks the vibes and says yes or no, but she does NOT write it in the group chat. no receipts, no paper trail, we move in silence 🀫


🌸 SYNOPSIS 🌸

int avc_has_perm_noaudit (u32 ssid , u32 tsid , u16 tclass , u32
requested , unsigned int flags , struct av_decision *avd );

that's the whole signature, don't @ me, it's giving six-argument main character energy πŸ‘‘

πŸ¦‹ ARGUMENTS πŸ¦‹

  • ssid β€” source security identifier. the "who's asking" SID, the origin story πŸ’«
  • tsid β€” target security identifier. the "who are they asking about" SID, the other half of the ship 🫢
  • tclass β€” target security class. this is the category the permissions get read through, so like, context is everything bestie
  • requested β€” the requested permissions, interpreted based on tclass. yes literally, the meaning depends on tclass, so don't come at it sideways
  • flags β€” AVC_STRICT or 0. two choices, that's the whole menu πŸ’…
  • avd β€” access vector decisions. the output spot where the decisions get copied πŸ’Œ

πŸ”₯ DESCRIPTION πŸ”₯

so the whole thing is: check the AVC to determine whether the requested permissions are granted for the SID pair (ssid, tsid), interpreting the permissions based on tclass, and call the security server on a cache miss to obtain a new decision and add it to the cache. periodt πŸ’€

then she returns a copy of the decisions in avd. cute, right? πŸŽ€

the return values are:

  • 0 if all requested permissions are granted β€” slay, we love a yes
  • -EACCES if any permissions are denied β€” not slay, but at least she told you
  • another -errno upon other errors β€” it's giving "something else went wrong, check the errno bestie"
fr fr, this function is typically called by avc_has_perm, but may also be called directly to separate permission checking from auditing, e.g. in cases where a lock must be held for the check but should be released for the auditing. that's the whole reason she exists β€” the lock-holding part and the auditing part have different vibes and you gotta keep 'em apart πŸ˜­πŸ”’

πŸ’œ SEE ALSO πŸ’œ

kernel file ./security/selinux/avc.c β€” go read the source, iykyk πŸ“–βœ¨ and also these icons:


and that's the page bestie, no cap, every flag accounted for, go check some perms πŸ§šπŸ’–

okay bye ily, this one's brought to you by ./security/selinux, October 2026 edition β€” and yes, avc_has_perm_noaudit(9) is literally the title, we came full circle 🌈⭐

πŸ“¦ where this page comes from