CR_CANSEEOTHERUIDS(9)
π CR_CANSEEOTHERUIDS(9) π
okay so this page is from the Kernel Developer's Manual, section 9, and it's giving βinternal credential vibe checkβ energy. Bestie, if you're here, you're probably deep in kernel-land, so let's go. π¦
πΈ NAME πΈ
cr_canseeotheruids β determine if subjects may see entities with differing user ID π
β¨ SYNOPSIS β¨
int
cr_canseeotheruids(struct ucred *u1, struct ucred *u2);
π¦ DESCRIPTION π¦
This function is internal. π¨ Like, for real: its functionality is integrated into the function cr_bsd_visible(9), which should be called instead. So if you were about to call this one directly, bestie, redirect that energy.
What it actually does: this function checks if a subject associated to credentials u1 is denied seeing a subject or object associated to credentials u2 by a policy that requires both credentials to have the same real user ID.
This policy is active if and only if the sysctl(8) variable security.bsd.see_other_uids is set to zero. π«Ά
As usual, the superuser (effective user ID 0) is exempt from this policy provided that the sysctl(8) variable security.bsd.suser_enabled is non-zero and no active MAC policy explicitly denies the exemption (see priv_check_cred(9)). π
π₯ RETURN VALUES π₯
The cr_canseeotheruids() function returns:
0β if the policy is disabled, both credentials have the same real user ID, or ifu1has privilege exempting it from the policy. β¨ESRCHβ otherwise. π
π SEE ALSO π
mwah π this iconic little page is brought to you by Debian, dated August 18, 2023 β CR_CANSEEOTHERUIDS(9) girlies, stay visible only when the policy says so. π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2003 Joseph Koshy <jkoshy@FreeBSD.org>
- Copyright (c) 2023 Olivier Certner <olce.freebsd@certner.fr>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms