cap_capable_helper(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cap_capable_helper(9) β€” the Kernel API Manual, but make it group chat 🫢

okay bestie, so this page lives in the Kernel API Manual under the name cap_capable_helper(9) β€” say it with me, it's giving "tiny function, big security energy" ✨


✨ NAME ✨

cap_capable_helper β€” literally just answers the question: does this task actually have a particular effective capability or not? πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int cap_capable_helper (const struct cred *cred , struct user_namespace
*target_ns , const struct user_namespace *cred_ns , int cap );
ngl that signature is a whole vibe check on its own, so let's break it down chapter by chapter πŸ‘‘

πŸŽ€ ARGUMENTS πŸŽ€

  • cred β€” the credentials you're working with, aka the receipts πŸ’–
  • target_ns β€” the user namespace of the resource being accessed β€” i.e. where the thing lives
  • cred_ns β€” the user namespace of the credentials β€” i.e. who is asking
  • cap β€” the capability you want to check for, the whole point of the function, the main character tbh 🌟

πŸ’œ DESCRIPTION πŸ’œ

So here's the teΠ°: this function determines whether the nominated task has the specified capability chilling in its effective set. Returns 0 if it does β€” slay β€” and -ve if it does not 😭

If you want more details (and honestly, who doesn't), see cap_capable for the full lore 🧚


🌈 SEE ALSO 🌈

Kernel file ./security/commoncap.c and honestly the whole friend group:


πŸ’€ reminder bestie: this is effective capability we're checking, not permitted, not inheritable β€” effective. Don't come for me, come for the manpage.

and that's the whole page, periodt πŸ’… πŸŽ€ this lil gem comes from ./security and it's dated October 2026 β€” so yes, she's from the future, no cap ⭐ πŸ¦‹ 🌸

πŸ“¦ where this page comes from