PRISON_CHECK(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’– NAME πŸ’–

okay so welcome to the PRISON_CHECK(9) page from the Kernel Developer's Manual, bestie πŸ’… this whole vibe is prison_check β€” determine if subjects may see entities according to jail restrictions ✨


✨ SYNOPSIS ✨

here's the exact include + signature, no cap πŸŽ€

#include <sys/jail.h>

int
prison_check(struct ucred *cred1, struct ucred *cred2);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so prison_check() is basically the jail-visibility vibe check πŸ”₯ it determines if a subject with credentials cred1 is denied access to subjects or objects with credentials cred2 β€” all according to the policy that a subject can see subjects or objects in its own jail or any sub-jail of it πŸ’–


🌸 RETURN VALUES 🌸

prison_check() returns ESRCH if cred2 is not in the same jail or a sub-jail of that of cred1 😭 that's the β€œnope, can't see it” result, fr fr.

In all other cases, prison_check() returns zero 🫢


πŸŽ€ SEE ALSO πŸŽ€

  • jail(2) β€” go read this too, bestie πŸ¦‹

okay that's the whole manual page, bestie πŸ’– this one's from Debian and dated August 18, 2023 β€” periodt ✨

πŸ“¦ where this page comes from