make_kgid(9)
πΈ NAME πΈ
make_kgid β maps a user-namespace gid pair into a kgid. This is make_kgid(9) from the Kernel API Manual, and we're gonna get into it, bestie π«Άβ¨
β¨ SYNOPSIS β¨
kgid_t make_kgid (struct user_namespace *ns , gid_t gid );
π ARGUMENTS π
nsβ the user namespace that thegidis in. Like, which namespace's world are we translating from? πgidβ the group identifier. The gid in question, fr fr π
π¦ DESCRIPTION π¦
Okay so make_kgid maps a user-namespace gid pair into a kernel-internal kgid, and then returns that kgid. That's the whole glow-up: user-namespace gid goes in, kernel-internal kgid comes out π
β¨
When there is no mapping defined for the user-namespace gid pair, INVALID_GID is returned. Not a vibe, but it's the documented behavior π. Callers are expected to test for and handle INVALID_GID being returned β like, please check, bestie, don't just ignore the return value π. And INVALID_GID may be tested for using gid_valid. Iconic little validation check, no cap β
π SEE ALSO π
- Kernel file
./kernel/user_namespace.c make_kuid(9)from_kuid(9)from_kuid_munged(9)from_kgid(9)from_kgid_munged(9)make_kprojid(9)from_kprojid(9)from_kprojid_munged(9)verify_root_map(9)
That's the whole page, bestie π«Ά β brought to you by the ./kernel source/version, dated October 2026, and yes, it's still make_kgid(9) at the bottom ππ
π¦ 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