capable(9)
π capable(9) β the Kernel API Manual, but make it bestie-core π
okay so this is the capable function from the kernel, and itβs giving βpermission check, but make it boolean.β Her whole thing is checking whether the current task has a specific superior capability in effect. No cap, itβs just that. π
β¨ NAME β¨
capable β determine if the current task has a superior capability in effect.
πΈ SYNOPSIS πΈ
bool capable (int cap );
π ARGUMENTS π
capβ the capability to be tested for. Thatβs it, thatβs the argument, bestie.
π¦ DESCRIPTION π¦
okay, so return true if the current task has the given superior capability currently available for use, and false if it doesnβt. Literally a vibe check for capability availability, but, yβknow, in kernel form. π
Also: 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 flagging the task because this capability is about to be the main character. π₯
π SEE ALSO π
The kernel file is literally ./kernel/capability.c, and then thereβs this whole friend group of capability-related pages:
sys_capget(9)sys_capset(9)has_ns_capability(9)has_ns_capability_noaudit(9)has_capability_noaudit(9)ns_capable(9)ns_capable_noaudit(9)ns_capable_setid(9)capable_noaudit(9)file_ns_capable(9)privileged_wrt_inode_uidgid(9)capable_wrt_inode_uidgid(9)ptracer_capable(9)
bye bestie β source/version: ./kernel; date: October 2026; this page: capable(9). Mwah πβ¨
π¦ 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