fsuidgid_has_mapping(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… fsuidgid_has_mapping

okay so bestie, this is a page from the Kernel API Manual β€” section 9, kernel-land, very much main character energy for people who write filesystems ✨. The function is literally called fsuidgid_has_mapping, and yes, that name is a mouthful, but we're gonna get through it together 🫢.

✨ NAME ✨

fsuidgid_has_mapping β€” check whether caller's fsuid/fsgid is mapped πŸ’–

🌸 SYNOPSIS 🌸

bool fsuidgid_has_mapping (struct super_block *sb , struct mnt_idmap
*idmap );

like, it returns a bool, takes two pointers, that's the whole vibe check πŸ”₯

πŸŽ€ ARGUMENTS πŸŽ€

  • sb β€” the superblock we want a mapping in, bestie. that's the one.
  • idmap β€” the idmap of the relevant mount. the mount's whole identity, honestly πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜•: this function checks whether the caller's fsuid and fsgid have a valid mapping in the s_user_ns of the superblock sb. that's it, that's the job πŸ’…

but wait β€” there's a little twist, and it's giving conditional logic ✨: if the caller is on an idmapped mount, then map the caller's fsuid and fsgid according to the idmap first. so like, idmap translation happens before the check, not after. periodt 🌈

⭐ RETURN ⭐

  • true if fsuid and fsgid is mapped
  • false if not

no in-between, no "it depends", just a clean yes or no, we love a decisive icon πŸ˜ŒπŸ’–

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/fs.h β€” and then a whole friend group of related things, ngl this list is long but every single one of them ate πŸ’€:


and that's the page, bestie πŸ§šπŸ’œ β€” brought to you from the ./include/linux corner of the kernel, dated October 2026, for fsuidgid_has_mapping(9) in the Kernel API Manual. go forth and check those mappings, ily, bye πŸŽ€βœ¨

πŸ“¦ where this page comes from