privileged_wrt_inode_uidgid(9)
π privileged_wrt_inode_uidgid(9) π
okay bestie, welcome to the Kernel API Manual, section 9 β yes we're in the kernel docs, no I'm not scared, and yes you're gonna get this. this one's a tiny little helper function that answers one very specific question for you, and honestly? it's giving "short king but emotionally available." let's go π«Ά
β¨ NAME β¨
privileged_wrt_inode_uidgid β the "wait, do capabilities in this namespace actually count for this inode?" check π
like, the whole vibe of this function is: is this thing privileged with respect to this inode's uid and gid. periodt.
πΈ SYNOPSIS πΈ
bool privileged_wrt_inode_uidgid (struct user_namespace *ns , struct mnt_idmap *idmap , const struct inode *inode );
it returns a bool, so you already know it's a yes/no girlie. no ambiguity, no "it depends," just true or false π
π ARGUMENTS π
nsβ the user namespace in question. like, which namespace are we judging everything from. main character of the story fr.idmapβ the idmap of the mount the inode was found from. yes bestie, the inode knows where it came from, and this is the receipt π§Ύinodeβ the inode in question. the actual file-ish thing we're doing a vibe check on π¦
π« DESCRIPTION π«
so here's literally the whole plot: return true if the inode uid and gid are within the namespace. that's it. that's the function. it's a one-liner and it's iconic for it π
no cap, that's the entire description in the original, and I'm not about to invent extra lore for you β the manpage said what it said. the uid and gid of the inode are within the namespace β true. everything else β not that. slay π
π₯ SEE ALSO π₯
- Kernel file
./kernel/capability.cβ the source file, go read it if you're feeling feral 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)capable_wrt_inode_uidgid(9)ptracer_capable(9)
the whole capability friend group showed up, and honestly they all ate π β¨
ok real talk for a sec: the original page documents no options, no environment variables, no exit statuses and no error returns here β just the one boolean result described above. so if anyone tells you there's more, they're making stuff up π
and that's the page bestie!! sourced straight from ./kernel, dated October 2026, and honestly? future-proof AND cute. 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