CR_CANSEE(9)
π CR_CANSEE(9) π
okay bestie, this is CR_CANSEE(9) from the Kernel Developer's Manual β section 9, kernel dev territory, and it's literally about deciding whether one credential can βseeβ another subject or object. No cap. π
πΈ NAME πΈ
cr_cansee β determine visibility of objects given their user credentials
β¨ SYNOPSIS β¨
#include <sys/proc.h>
int
cr_cansee(struct ucred *u1, struct ucred *u2);
π¦ DESCRIPTION π¦
Okay so picture this: this function determines if a subject with credential u1 can see a subject or object associated to credential u2. That's it. That's the whole plot β visibility, but for creds. π
Specific types of subjects may need to submit to additional or different restrictions. As an example, for processes, see p_cansee(9), which calls this function. So if you're here from process land, that's your next stop. π«Ά
The implementation relies on cr_bsd_visible(9), and consequently the sysctl(8) variables referenced in its manual page influence the result. Highkey important: those sysctls are part of the vibe. β¨
π RETURN VALUES π
This function returns zero if the subject with credential u1 can βseeβ the subject or object with credential u2. Otherwise it returns ESRCH. That's the whole vibe check: 0 means visible, ESRCH means nope. π
π₯ ERRORS π₯
[ESRCH]β The subject with credentialu1has been jailed and the subject or object with credentialu2does not belong to the same jail or one of its sub-jails, as determined byprison_check(9). π[ESRCH]β The MAC subsystem denied visibility.[ESRCH]βcr_bsd_visible(9)denied visibility according to the BSD security policies in force.
π SEE ALSO π
Go read these, bestie: cr_bsd_visible(9), mac(9), p_cansee(9), prison_check(9). iykyk π
xoxo, this page is from Debian, dated August 18, 2023 β CR_CANSEE(9) signing off π
π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2006 Ceri Davies <ceri@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