blob: cefd7eac4d74dc478a0831dfaa691567690cd3a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
<table class="head">
<tr>
<td class="head-ltitle">PRISON_CHECK(9)</td>
<td class="head-vol">Kernel Developer's Manual</td>
<td class="head-rtitle">PRISON_CHECK(9)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">prison_check</code> —
<span class="Nd">determine if subjects may see entities according to jail
restrictions</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="In">#include
<<a class="In">sys/jail.h</a>></code></p>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">prison_check</code>(<var class="Fa" style="white-space: nowrap;">struct
ucred *cred1</var>, <var class="Fa" style="white-space: nowrap;">struct
ucred *cred2</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">This function determines if a subject with credentials
<var class="Fa">cred1</var> is denied access to subjects or objects with
credentials <var class="Fa">cred2</var> according to the policy that a
subject can see subjects or objects in its own jail or any sub-jail of
it.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
<p class="Pp">The <code class="Fn">prison_check</code>() function returns
<code class="Er">ESRCH</code> if <var class="Fa">cred2</var> is not in the
same jail or a sub-jail of that of <var class="Fa">cred1</var>. In all other
cases, <code class="Fn">prison_check</code>() returns zero.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><a class="Xr">jail(2)</a></p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">August 18, 2023</td>
<td class="foot-os">FreeBSD 15.0</td>
</tr>
</table>
|