Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

p_cansee(9) [freebsd man page]

P_CANSEE(9)						   BSD Kernel Developer's Manual					       P_CANSEE(9)

NAME
p_cansee -- determine visibility of a process SYNOPSIS
#include <sys/param.h> #include <sys/proc.h> int p_cansee(struct thread *td, struct proc *p); DESCRIPTION
This function can be used to determine if a given process p is visible to the thread td, where the notion of ``visibility'' may be read as ``awareness of existence''. The function is implemented using cr_cansee(9), and the dependencies on sysctl(8) variables documented in the cr_cansee(9) manual page apply. RETURN VALUES
The p_cansee() function returns 0 if the process denoted by p is visible by thread td, or a non-zero error return value otherwise. ERRORS
[ESRCH] Process p is not visible to thread td as determined by cr_cansee(9). [ESRCH] Thread td has been jailed and process p does not belong to the same jail as td. [ESRCH] The MAC subsystem denied visibility. SEE ALSO
jail(2), sysctl(8), cr_cansee(9), mac(9), p_candebug(9), prison_check(9) BSD
November 19, 2006 BSD

Check Out this Related Man Page

CR_CANSEE(9)						   BSD Kernel Developer's Manual					      CR_CANSEE(9)

NAME
cr_cansee -- determine visibility of objects given their user credentials SYNOPSIS
#include <sys/param.h> #include <sys/systm.h> #include <sys/ucred.h> int cr_cansee(struct ucred *u1, struct ucred *u2); DESCRIPTION
This function determines the visibility of objects in the kernel based on the real user IDs and group IDs in the credentials u1 and u2 asso- ciated with them. The visibility of objects is influenced by the sysctl(8) variables security.bsd.see_other_gids and security.bsd.see_other_uids, as per the description in cr_seeothergids(9) and cr_seeotheruids(9) respectively. RETURN VALUES
This function returns zero if the object with credential u1 can ``see'' the object with credential u2, or ESRCH otherwise. ERRORS
[ESRCH] The object with credential u1 cannot ``see'' the object with credential u2. [ESRCH] The object with credential u1 has been jailed and the object with credential u2 does not belong to the same jail as u1. [ESRCH] The MAC subsystem denied visibility. SEE ALSO
cr_seeothergids(9), cr_seeotheruids(9), mac(9), p_cansee(9) BSD
November 19, 2006 BSD
Man Page