Page MenuHomeFreeBSD

D40637.id124012.diff
No OneTemporary

D40637.id124012.diff

diff --git a/share/man/man9/p_cansee.9 b/share/man/man9/p_cansee.9
--- a/share/man/man9/p_cansee.9
+++ b/share/man/man9/p_cansee.9
@@ -26,19 +26,18 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 19, 2006
+.Dd June 16, 2023
.Dt P_CANSEE 9
.Os
.Sh NAME
.Nm p_cansee
.Nd determine visibility of a process
.Sh SYNOPSIS
-.In sys/param.h
.In sys/proc.h
.Ft int
.Fn p_cansee "struct thread *td" "struct proc *p"
.Sh DESCRIPTION
-This function can be used to determine if a given process
+This function determines if a given process
.Fa p
is visible to the thread
.Fa td ,
@@ -47,13 +46,14 @@
may be read as
.Dq "awareness of existence" .
.Pp
-The function is implemented using
-.Xr cr_cansee 9 ,
-and the dependencies on
-.Xr sysctl 8
-variables documented in the
-.Xr cr_cansee 9
-manual page apply.
+This function explicitly allows a thread to always see its own process,
+even in the face of pending credentials changes
+.Po
+see
+.Xr ucred 9
+.Pc .
+Otherwise, it simply defers to
+.Xr cr_cansee 9 .
.Sh RETURN VALUES
The
.Fn p_cansee
@@ -64,30 +64,18 @@
.Fa p
is visible by thread
.Fa td ,
-or a non-zero error return value otherwise.
+or ESRCH otherwise.
.Sh ERRORS
.Bl -tag -width Er
.It Bq Er ESRCH
-Process
-.Fa p
-is not visible to thread
-.Fa td
-as determined by
-.Xr cr_cansee 9 .
-.It Bq Er ESRCH
Thread
.Fa td
-has been jailed and process
+is not part of process
.Fa p
-does not belong to the same jail as
-.Fa td .
-.It Bq Er ESRCH
-The MAC subsystem denied visibility.
+and cannot see it as determined by
+.Xr cr_cansee 9 .
.El
.Sh SEE ALSO
-.Xr jail 2 ,
-.Xr sysctl 8 ,
+.Xr ucred 9 ,
.Xr cr_cansee 9 ,
-.Xr mac 9 ,
-.Xr p_candebug 9 ,
-.Xr prison_check 9
+.Xr p_candebug 9

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 18, 5:31 PM (7 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29917936
Default Alt Text
D40637.id124012.diff (1 KB)

Event Timeline