has_capability_noaudit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… has_capability_noaudit β€” the kernel API manual, bestie edition πŸŽ€

okay so real talk, this is page has_capability_noaudit(9) from the Kernel API Manual, and it's genuinely one of the shorter ones so we can absolutely get through it together. stay with me πŸ’–


✨ NAME ✨

has_capability_noaudit β€” does a task have a capability (unaudited) in the initial user ns

like, the whole vibe of this function is "check the permission, but don't tell anyone about it" 🀫


πŸ¦‹ SYNOPSIS πŸ¦‹

bool has_capability_noaudit (struct task_struct *t , int cap );

that's it. that's the whole signature. two args, returns a bool, no cap fr fr 🧚


🌸 ARGUMENTS 🌸

  • t β€” the task in question. yes literally the task you're side-eyeing πŸ‘€
  • cap β€” the capability to be tested for. the thing you wanna know if they have or not πŸ’…

⭐ DESCRIPTION ⭐

Returns true if the specified task has the given superior capability currently in effect to init_user_ns, and false if not. don't write an audit message for the check, that's the whole point β€” hence the noaudit in the name, iykyk πŸ™ˆ

⚠️ heads up, bestie: note that this does not set PF_SUPERPRIV on the task. like, at all. don't come for me, that's just how it is 😭

πŸ”₯ SEE ALSO πŸ”₯

all the siblings and cousins of this function, in the kernel file ./kernel/capability.c:

whole friend group honestly, they all ate πŸ‘‘


this page lives in ./kernel, dated October 2026, and it's the has_capability_noaudit(9) page specifically 🫢 that's the whole thing, you understood it, slay, bye bestie πŸ’œβœ¨

πŸ“¦ where this page comes from