CR_CANSEE(9)

πŸ’– CR_CANSEE(9) πŸ’–

okay bestie, we're in the Kernel Developer's Manual now, and this one is called cr_cansee β€” it's giving "can you even see me tho" energy and honestly? iconic. πŸ¦‹


✨ NAME ✨

cr_cansee β€” determine visibility of objects given their user credentials πŸ‘€


🌸 SYNOPSIS 🌸

#include <sys/param.h>
#include <sys/systm.h>
#include <sys/ucred.h>

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

πŸ’… DESCRIPTION πŸ’…

so basically this function decides the visibility of objects in the kernel based on the real user IDs and group IDs sitting inside the credentials u1 and u2 that are associated with those objects. it's a whole vibe check for credentials, no cap. 🫢

and the visibility of objects is influenced by the sysctl(8) variables security.bsd.see_other_gids and security.bsd.see_other_uids, exactly as described in cr_seeothergids(9) and cr_seeotheruids(9) respectively. so like, if you wanna know the tea, those two are where it's at. ✨


🌈 RETURN VALUES 🌈

this function returns zero if the object with credential u1 can "see" the object with credential u2, or ESRCH otherwise. simple as that, periodt. πŸ’…


πŸ”₯ ERRORS πŸ”₯

  • [ESRCH] β€” the object with credential u1 cannot "see" the object with credential u2. it's giving blocked. πŸ™ˆ
  • [ESRCH] β€” the object with credential u1 has been jailed and the object with credential u2 does not belong to the same jail as u1. different jail, different ✨world✨.
  • [ESRCH] β€” the MAC subsystem denied visibility. not us, not you, it's the MAC subsystem's decision bestie 😭

πŸŽ€ SEE ALSO πŸŽ€

cr_seeothergids(9), cr_seeotheruids(9), mac(9), p_cansee(9)


and that's the whole page, bestie!! πŸ’– this one came to you from Debian, dated November 19, 2006 β€” yeah it's a lil vintage, but vintage is just another word for classic and classic is iconic. πŸ‘‘ stay visible, stay unjailed, mwah πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from