CR_SEEOTHERUIDS(9)
π CR_SEEOTHERUIDS π
okay bestie, so this is a page from the Kernel Developer's Manual β section 9, kernel land, the deep lore β and it's about cr_seeotheruids. it's giving gatekeeper of vibes. it decides who gets to see whom in the kernel. let's get into it π«Ά
β¨ NAME β¨
cr_seeotheruids β determine visibility of objects given their user credentials
like, can these two objects perceive each other or not. that's the whole job. no cap.
πΈ SYNOPSIS πΈ
int
cr_seeotheruids(struct ucred *u1, struct ucred *u2);
two credential pointers walk in, one int walks out. classic.
π¦ DESCRIPTION π¦
so this function figures out the visibility of objects in the kernel, and it does that based on the real user IDs inside the credentials u1 and u2 that are associated with those objects. literally the real UIDs, that's what's doing the deciding here.
now, the whole visibility situation is influenced by the sysctl(8) variable security.bsd.see_other_uids. here's the tea:
- if that variable is non-zero, then all objects in the kernel are visible to each other β irrespective of their user IDs. everybody sees everybody. no walls, no secrets, full transparency era. π
- if that variable is zero, then things get picky. the object with credentials
u2is visible to the object with credentialsu1only if either:u1is the superuser credential, oru1andu2have the same real user ID.
so likeβ¦ root always gets in, and same-real-UID besties get in, and everybody else is on read. π
π SYSCTL VARIABLES π
security.bsd.see_other_uidsβ must be non-zero if objects with unprivileged credentials are to be able to see each other. that's it, that's the whole requirement. if you want the unprivileged girlies peeking at each other, this knob has to be turned on. periodt.
β RETURN VALUES β
this function returns zero if the object with credential u1 can "see" the object with credential u2. and if it can't? you get ESRCH. that's the other option. no in-between, no gray area, just zero or ESRCH. π₯
π SEE ALSO π
the girlies that live next door to this one. go say hi. iykyk. π§
lowkey this whole page is just "can u see me or not" energy and honestly? iconic. π¦
and that's the whole thing, bestie π this one came out of the Debian crew and it's dated November 11, 2003 β vintage, but still serving. mwah, take care, go read cr_seeothergids(9) next, ok bye πβ¨π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2003 Joseph Koshy <jkoshy@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms