Skip to content

Commit e9fdd49

Browse files
OlCe2mhorne
authored andcommitted
prison_check(9): Bring up-to-date with hierarchical jails
Reviewed by: bcr, emaste, pauamma_gundo.com, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40639
1 parent eb94f24 commit e9fdd49

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

share/man/man9/prison_check.9

+8-10
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,33 @@
2525
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2626
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727
.\"
28-
.Dd December 11, 2003
28+
.Dd August 18, 2023
2929
.Dt PRISON_CHECK 9
3030
.Os
3131
.Sh NAME
3232
.Nm prison_check
33-
.Nd determine if two credentials belong to the same jail
33+
.Nd determine if subjects may see entities according to jail restrictions
3434
.Sh SYNOPSIS
3535
.In sys/jail.h
3636
.Ft int
3737
.Fn prison_check "struct ucred *cred1" "struct ucred *cred2"
3838
.Sh DESCRIPTION
39-
This function can be used to determine if the two credentials
39+
This function determines if a subject with credentials
4040
.Fa cred1
41-
and
41+
is denied access to subjects or objects with credentials
4242
.Fa cred2
43-
belong to the same jail.
43+
according to the policy that a subject can see subjects or objects in its own
44+
jail or any sub-jail of it.
4445
.Sh RETURN VALUES
4546
The
4647
.Fn prison_check
4748
function
4849
returns
4950
.Er ESRCH
5051
if
51-
.Fa cred1
52-
has been jailed, and
53-
.Fa cred1
54-
and
5552
.Fa cred2
56-
do not belong to the same jail.
53+
is not in the same jail or a sub-jail of that of
54+
.Fa cred1 .
5755
In all other cases,
5856
.Fn prison_check
5957
returns zero.

0 commit comments

Comments
 (0)