capable_wrt_inode_uidgid(9)
π capable_wrt_inode_uidgid(9) π
okay so bestie, we're in the Kernel API Manual today and the main character of this page is capable_wrt_inode_uidgid(9). she's a little permission-checking icon and honestly she ate. let's get into it β¨
πΈ NAME πΈ
capable_wrt_inode_uidgid β the one that checks nsown_capable and whether the uid and gid are mapped π«Ά
β¨ SYNOPSIS β¨
bool capable_wrt_inode_uidgid (struct mnt_idmap *idmap , const struct
inode *inode , int cap );
like, she takes three things and gives you back a bool. simple. elegant. no cap π
π ARGUMENTS π
idmapβ the idmap of the mount that the inode was found from πΊοΈinodeβ the inode in question, the actual subject of the vibe check πcapβ the capability in question, aka which power we're asking about π
π¦ DESCRIPTION π¦
so here's the tea β β she returns true if both of these things are true:
- the current task has the given capability, targeted at its own user namespace π«
- the given inode's uid and gid are mapped into the current user namespace π
both boxes ticked? true, slay. anything missing? no cap, you're getting a false. periodt π
π SEE ALSO π
- Kernel file
./kernel/capability.c 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(9)capable_noaudit(9)file_ns_capable(9)privileged_wrt_inode_uidgid(9)ptracer_capable(9)
the whole capability friend group fr fr, go say hi to all of them π§ββοΈ
aaaand that's the page! brought to you by the ./kernel girlies, dated October 2026 β catch you in the next manpage bestie, 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