verify_root_map(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so this is verify_root_map(9) from the Kernel API Manual, and it's literally the function that checks the uid 0 mapping. bestie, it's giving "are you actually allowed to do this" energy πŸ”₯


✨ SYNOPSIS ✨

bool verify_root_map (const struct file *file , struct user_namespace
*map_ns , struct uid_gid_map *new_map );

πŸŽ€ ARGUMENTS πŸŽ€

  • file β€” the idmapping file, bestie. that's the file in question πŸ’…
  • map_ns β€” the user namespace of the target process πŸ‘‘
  • new_map β€” the requested idmap, aka the map being asked for πŸ¦‹

🌸 DESCRIPTION 🌸

so here's the tea: if a process requests mapping parent uid 0 into the new ns, this function verifies that the process writing the map had the CAP_SETFCAP capability. why? because the target process will be able to write fscaps that are valid in ancestor user namespaces. no cap, no mapping β€” periodt πŸ’€βœ¨


🌈 RETURN 🌈

  • true if the mapping is allowed πŸ’–
  • false if not πŸ™ˆ

🫢 SEE ALSO 🫢


shoutout to ./kernel for the source/version vibe and October 2026 for the date stamp β€” iconic, no cap πŸ’œπŸŽ€

πŸ“¦ where this page comes from