cap_capable_helper(9)
π 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 livescred_nsβ the user namespace of the credentials β i.e. who is askingcapβ 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:
cap_capable(9)cap_settime(9)cap_ptrace_access_check(9)cap_ptrace_traceme(9)cap_capget(9)cap_capset(9)cap_inode_need_killpriv(9)cap_inode_killpriv(9)kuid_root_in_ns(9)rootid_from_xattr(9)cap_convert_nscap(9)get_vfs_caps_from_disk(9)cap_bprm_creds_from_file(9)cap_inode_setxattr(9)cap_inode_removexattr(9)cap_task_fix_setuid(9)cap_task_setscheduler(9)cap_task_setioprio(9)cap_task_setnice(9)cap_task_prctl(9)cap_vm_enough_memory(9)cap_mmap_addr(9)
π 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms