MCPcopy Create free account
hub / github.com/F-Stack/f-stack / p_cansee

Function p_cansee

freebsd/kern/kern_prot.c:1462–1470  ·  view source on GitHub ↗

- * Determine if td "can see" the subject specified by p. * Returns: 0 for permitted, an errno value otherwise * Locks: Sufficient locks to protect p->p_ucred must be held. td really * should be curthread. * References: td and p must be valid for the lifetime of the call */

Source from the content-addressed store, hash-verified

1460 * References: td and p must be valid for the lifetime of the call
1461 */
1462int
1463p_cansee(struct thread *td, struct proc *p)
1464{
1465
1466 /* Wrap cr_cansee() for all functionality. */
1467 KASSERT(td == curthread, ("%s: td not curthread", __func__));
1468 PROC_LOCK_ASSERT(p, MA_OWNED);
1469 return (cr_cansee(td->td_ucred, p->p_ucred));
1470}
1471
1472/*
1473 * 'conservative_signals' prevents the delivery of a broad class of

Callers 15

filt_procattachFunction · 0.70
pgetFunction · 0.70
sysctl_kern_proc_iterateFunction · 0.70
kern_procctlFunction · 0.70
sys_getpgidFunction · 0.70
kern_getsidFunction · 0.70
sys_setpgidFunction · 0.70
sysctl_kern_fileFunction · 0.70
kern_ptraceFunction · 0.70
sys_ktraceFunction · 0.70
kern_sched_getparamFunction · 0.70
kern_sched_getschedulerFunction · 0.70

Calls 1

cr_canseeFunction · 0.70

Tested by

no test coverage detected