ns_capable_noaudit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ns_capable_noaudit β€” like, the kernel API manual, bestie ✨

okay so real quick, this is ns_capable_noaudit(9) from the Kernel API Manual and honestly? she's a lil icon. let's get into it 🫢


✨ NAME ✨

ns_capable_noaudit β€” bestie, this is how you determine if the current task has a superior capability (unaudited) in effect. yes that's the whole vibe check πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

bool ns_capable_noaudit (struct user_namespace *ns , int cap );

literally just two args, no cap. so clean. πŸ’…


🌸 ARGUMENTS 🌸

  • ns β€” the usernamespace we want the capability in πŸ‘‘ this is the namespace you're like "hey does this work in here" about
  • cap β€” the capability to be tested for πŸ”₯ the actual thing you're asking about, bestie

πŸ’– DESCRIPTION πŸ’–

Return true if the current task has the given superior capability currently available for use, false if not. simple as that, no notes ✨

and okay, the juicy part: this sets PF_SUPERPRIV on the task if the capability is available β€” on the assumption that it's about to be used. like it's literally manifesting that you're gonna use it πŸ™ˆ so it's marking you as privileged in advance.

🌈 reminder bestie: it's the unaudited one β€” the name says it, PF_SUPERPRIV gets set, and it assumes the capability is about to be used. don't forget that part, iykyk πŸ’€

🧚 SEE ALSO 🧚

Kernel file ./kernel/capability.c and honestly the whole friend group:

like. the whole squad showed up. obsessed πŸ˜­πŸ’œ


and that's the page, bestie πŸ“ this lil run came out of ./kernel, dated October 2026, and it's ns_capable_noaudit(9) all the way down. mwah πŸ’‹β­

πŸ“¦ where this page comes from