]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - share/man/man9/p_cansee.9
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / share / man / man9 / p_cansee.9
1 .\"
2 .\" Copyright (c) 2003 Joseph Koshy <jkoshy@FreeBSD.org>
3 .\" Copyright (c) 2006 Ceri Davies <ceri@FreeBSD.org>
4 .\"
5 .\" All rights reserved.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
17 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
20 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 .\"
27 .\" $FreeBSD$
28 .\"
29 .Dd November 19, 2006
30 .Dt P_CANSEE 9
31 .Os
32 .Sh NAME
33 .Nm p_cansee
34 .Nd determine visibility of a process
35 .Sh SYNOPSIS
36 .In sys/param.h
37 .In sys/proc.h
38 .Ft int
39 .Fn p_cansee "struct thread *td" "struct proc *p"
40 .Sh DESCRIPTION
41 This function can be used to determine if a given process
42 .Fa p
43 is visible to the thread
44 .Fa td ,
45 where the notion of
46 .Dq visibility
47 may be read as
48 .Dq "awareness of existence" .
49 .Pp
50 The function is implemented using
51 .Xr cr_cansee 9 ,
52 and the dependencies on
53 .Xr sysctl 8
54 variables documented in the
55 .Xr cr_cansee 9
56 manual page apply.
57 .Sh RETURN VALUES
58 The
59 .Fn p_cansee
60 function
61 returns
62 .Li 0
63 if the process denoted by
64 .Fa p
65 is visible by thread
66 .Fa td ,
67 or a non-zero error return value otherwise.
68 .Sh ERRORS
69 .Bl -tag -width Er
70 .It Bq Er ESRCH
71 Process
72 .Fa p
73 is not visible to thread
74 .Fa td
75 as determined by
76 .Xr cr_cansee 9 .
77 .It Bq Er ESRCH
78 Thread
79 .Fa td
80 has been jailed and process
81 .Fa p
82 does not belong to the same jail as
83 .Fa td .
84 .It Bq Er ESRCH
85 The MAC subsystem denied visibility.
86 .El
87 .Sh SEE ALSO
88 .Xr jail 2 ,
89 .Xr sysctl 8 ,
90 .Xr cr_cansee 9 ,
91 .Xr mac 9 ,
92 .Xr p_candebug 9 ,
93 .Xr prison_check 9