CR_SEEOTHERGIDS(9)

✨ CR_SEEOTHERGIDS ✨

okay bestie, so this is a page from the Kernel Developer's Manual (section 9, we're in the big leagues now πŸ’…) β€” and it's all about cr_seeothergids, aka "can this thing see that other thing based on their group memberships?" 🫢


🌸 NAME 🌸

cr_seeothergids β€” figure out the visibility of objects based on their group memberships πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

int
cr_seeothergids(struct ucred *u1, struct ucred *u2);

πŸ¦‹ DESCRIPTION πŸ¦‹

So the way this works is: this function determines the visibility of objects in the kernel, and it does that based on the group IDs inside the credentials u1 and u2 that are associated with those objects. periodt ✨

And here's the tea β˜• β€” that visibility is influenced by the sysctl(8) variable security.bsd.see_other_gids:

  • if that variable is non-zero, then literally all objects in the kernel are visible to each other, no matter what their group membership is β€” everyone's in the group chat, no cap 😌
  • if that variable is zero, then the object with credentials u2 is visible to the object with credentials u1 if either u1 is the super-user credential, or at least one of u1's group IDs is present in u2's group set 🫢

πŸ’œ SYSCTL VARIABLES πŸ’œ

  • security.bsd.see_other_gids β€” must be non-zero if objects with unprivileged credentials are gonna be able to see each other πŸ‘€

🌈 RETURN VALUES 🌈

This function returns zero if the object with credential u1 can "see" the object with credential u2, or ESRCH otherwise πŸ’€


⭐ SEE ALSO ⭐


and that's the whole page bestie, you ate that πŸ“ stay iconic, go read your kernel source, mwah πŸ’–

this one came from the Debian folks, dated November 11, 2003 β€” vintage but still slaying πŸ‘‘

πŸ“¦ where this page comes from